3 ms·
I don't think #[no_std] has any effect here, other that guaranteeing that know runtime-using functions are called (by not linking in any runtime at all). I bel
by dbaupp 13y ago
I don't think #[no_std] has any effect here, other that guaranteeing that know runtime-using functions are called (by not linking in any runtime at all).
I believe you can also just start runtimes in each call into Rust. Obviously it won't be particularly efficient.
- ben0x539 13y agoThat's what I meant re: no_std, yeah. Would it be possible to lazily start libnative if a call into the runtime is made but there's none there, but then keep it running for that thread for subsequent calls?
- dbaupp 13y agoMaybe? The current design is starting a runtime is a blocking call, though, i.e. I think you'd call `native::run`[1] and run anything needing a runtime inside that (I haven't experimented with this part of our FFI in detail). [1]: http://static.rust-lang.org/doc/master/native/fn.run.html http://static.rust-lang.org/doc/master/native/fn.run.html