What is the current state of crABI?

Hi everyone. I'm working with some other people to write an OS in Rust. Our plan is to make a modular monolithic kernel so naturally we need to have some form of ABI stability for modules and the base kernel to be able to call/return into each other.

To that end I wanted to ask if anyone knows what the current state of crABI is and if it's on the path to stabilization at some point or even just functional enough to be used for what we need on nightly (which is our normal toolchain channel for the project).

Also is there any documentation for using crabi as in its current state?

If crabi isn't usable the only other option I can think of is lots and lots of extern "C" wrapper functions and marshaling and unmarshaling a ton of data structures on both sides of the ABI boundary and reducing performance by a decent amount reducing one of the main benefits of our chosen kernel architecture.

I'd also be open to hearing any alternative solutions to this problem as well if you know of any.

As of now the goal is for the base kernel and all modules to be written in Rust and if any third-party wants to use another language then they need to provide whatever adapter code is needed to make that possible.

2 Likes

I don't know the answer to this but two other options are:

Only the former is apparently no-std though.

1 Like

Afaict, this is the RFC issue crABI v1 by joshtriplett · Pull Request #3470 · rust-lang/rfcs · GitHub

1 Like

It seems like at this point crABI is a no go so we'll need to make our own extern "C" wrapper interface for modules to use possibly with assistance from stabby.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.