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

Thanks for the link, I'm definitely interested in how it's done without a runtime. I know in theory a coroutine can compile down to a gory switch statement and some state, but doing anything useful with it gets hairy, I'm sure.


So, you do need to include some code to drive the futures. The key is that this is a library in Rust, rather than built into the language, and so Rust programs that don't use async do not pay the cost.

And yeah, that's sort of how it works under the covers :)




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

Search: