Hacker News new | ask | show | jobs
by nitrogen 3811 days ago
Does bare metal Rust also use memcpy() or other library functions? If so, how are those linked into the final binary?
2 comments

Yes, LLVM will assume three or four functions exist regardless. The rlibc crate provides a Rust implementation of them, so you just add it and you're done. https://github.com/alexcrichton/rlibc
They are usually provided by libc, but if you do low level stuff they are provided by other means.