Add support for `std`
The CI is too slow to even check out the rust submodule, let alone build the compiler. Probably best to create a separate branch rather than merging into theseus_main.
To upstream this we would have to:
- Implement the rest of
stdfunctionality - Publish
theseus_ffiandtheseus_shimto crates.io
@kevinaboos should be ready for review
@kevinaboos should be ready for review
Great! I'll take a look tonight or tomorrow late afternoon.
couldn't we just have the shim and libtheseus layers convert to/from those existing ABI-stable FFI types, regardless of whether they came from our lib or another lib?
So not really. E.g. we call app_io::stdout and get an alloc::sync::Arc<dyn Writer>. We can't call stabby::Arc::from_raw(alloc::sync::Arc::into_raw(writer)) because stabby::Arc and sync::Arc could have different layouts. And there's not really much else we could do. We can't get an owned reference to the dyn Writer and so we can't turn it into a stabby trait object and wrap it in a stabby::Arc.
And conceptually that makes sense. writer is layed out in memory as an alloc::sync::Arc<dyn Writer> and there is no way we can interpret it as a stabby::Arc<vtable!(dyn Writer)> because they have different layouts.