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

Congrats on all the progress, guys! I'm really looking forward to getting to work with Rust. I have a couple of questions:

Is the new fixed-stack FFI arrangement the end goal, or is it a stepping stone to a different system? It seems as though always using a big, fixed stack would cause performance/memory issues. Could the compiler detect which Rust fn's call extern "C" functions so I don't have to write annotations? Thanks!



Fixed-stack is not the end goal. The intent is to migrate back towards small, growable stacks.

There were long discussions over how "smart" the extern stack-size strategy should be. The current arrangement is, as ever, a compromise. In practice, most people writing bindings to C from Rust will wrap the C call into a very thin wrapper function whose job is to handle type conversions and managing the necessary `unsafe` bits. The hope is that putting the annotation on these wrapper functions won't be very onerous, with the result that any Rust code that calls the wrapper functions won't ever have to bothered with remembering the annotations.


Makes sense, thanks! As an outsider it can be tricky to know which things in the release notes are "This feature is ready" vs "This is simply the present state of things."


Rust is basically entirely 'this is simply the present state of things.' :)


Plus there's also rather a lot of non-codified knowledge about what's happening and going to happen. But if you pay much attention to the mailing list and stay in #rust you'll pick up an awful lot of it.





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

Search: