#running #run #cat

app quine

1 个不稳定版本

0.1.0 2022年10月6日

#47#cat

MIT 许可证

2KB

quine

运行程序输出的内容

$ cargo run
fn main() {
    let x = "fn main() {\n    let x = ";
    let y = "print!(\"{}{:?};\n    let y = {:?};\n    {}\", x, x, y, y)\n}\n";
    print!("{}{:?};
    let y = {:?};
    {}", x, x, y, y)
}

与程序本身的源代码相同

$ cat quine.rs
fn main() {
    let x = "fn main() {\n    let x = ";
    let y = "print!(\"{}{:?};\n    let y = {:?};\n    {}\", x, x, y, y)\n}\n";
    print!("{}{:?};
    let y = {:?};
    {}", x, x, y, y)
}

无运行时依赖