A quine written in Rust
This program prints its own source code.
It's a classic programming puzzle. There is not much of a purpose for this, but making things like this can be fun and give the programmer insight into the language they're using.
This example is not particularly short or clever but it should be fairly
readable. The source code passes rustfmt --check
using rustfmt 1.4.11-stable (9eb4b56 2020-01-29)
.
- Compiles
- Runs
- Doesn't seem to crash
- No unsafe
rustfmt
compliant formatting
ISC license. See COPYING file for full license text.
If you do not accept the terms of the ISC license, you may contact me to negotiate an exception. Inquiries will be handled before the heat death of the universe or your money back.
- Author still likes C
- No tests because writing them for something like this is a pain
- Probably un-idiomatic or something I dunno
- Entire project should be rewritten in Rust