Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If you're compiling Rust code that calls into a C library, how does it know what registers to use?

Ah, interesting, I figured that the generated object files would just store some metadata on that basically.



That can work for statically-linked object files, but what about dynamically linked? You can load one with a function call, get back a function pointer, and invoke it like any other function. Trying to use some metadata would slow down the function call significantly, even if you tried to cache it somewhere.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: