6 ms·
Even if you don't statically link Rust's runtime? If so I can see that working for very simple code, but what about wanting to use Tasks/Threads or do I/O. Is
by berkut 12y ago
Even if you don't statically link Rust's runtime?
If so I can see that working for very simple code, but what about wanting to use Tasks/Threads or do I/O. Is that converted to native system calls at compile time?
- krenoten 12y agoYou can create freestanding binaries, but you need to implement more things on your own. Check out this page for some interesting projects: https://github.com/rust-lang/rust/wiki/Operating-system-development https://github.com/rust-lang/rust/wiki/Operating-system-deve...
- andolanra 12y agoAfter a series of recent changes, Rust's runtime has been radically reduced. I/O goes through system calls, and the threading system is just native OS threads. There's a very small amount of support needed for the "Rust runtime", including things like stack guards, but it's much smaller than it was. The RFC describing the changes is [^1] and the actual commit that finalized them is [^2]. [^1]: https://github.com/rust-lang/rfcs/pull/230 https://github.com/rust-lang/rfcs/pull/230 [^2]: https://github.com/rust-lang/rust/commit/0efafac398ff7f28c5f0fe756c15b9008b3e0534 https://github.com/rust-lang/rust/commit/0efafac398ff7f28c5f...