Hacker News new | ask | show | jobs
by zxcdw 4171 days ago
Care to elaborate why do you think so?
1 comments

Well for one: at least currently, there's a much better chance of having the c/c++ runtimes on a system than the Rust one I imagine.
You don't need a Rust runtime installed, you just need a glibc.
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?

After 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

[^2]: https://github.com/rust-lang/rust/commit/0efafac398ff7f28c5f...

You 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-deve...
AFAIK you can compile static binaries with Go and thus eliminate the dependencies.
Oops, apparently I was a little fast there. Apologies!

(Edit: I mistook this for a Go thread.)