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

> A stackful coroutine framework would probably have allowed for the same without requiring WASM

Interestingly Rust actually had this built in originally, but it was taken out of the language since it could be added back in as a library, and the devs thought it was important that Rust did not hide any costs from the user.

Which I can certainly buy. Especially once you consider use cases like embedded development. That said, it'd also suuuuure be nice to be able to opt-in to something like that and avoid the async headache.



I fully agree with the decision to remove the mandatory runtime mandate - which allows Rust to run everywhere.

The quoted sentence was more about the solution that Lunatic took to enable "synchronously looking code" - they apparently opted for WASM as an additional runtime layer to accomdate user-space scheduling. But it might have been possible to achieve similar goals by using stateful coroutines/fibers (similar to boost::coroutine, boost::context, etc).

I guess there might be a win in using WASM due to them being able to insert cooperative yielding instructions into the generated code. But the tradeoff is that WASM raw execution speed is lower than native.




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

Search: