Hi Nathan,
Thanks for your interest in Genode and Rust!
On the last rust update, it seemed like the Genode team determined one of the
next steps would be to explore rust on top of native Genode framework. Would
there be a project that would be able to help achieve this goal?
We don't have a clear path towards native Genode components in Rust,
because a native Rust Genode API would depend on a Genode ABI
(Application Binary Interface), for which we don't have a clear vision
yet. Right now, the Genode interfaces are defined by their C++
implementation (supplemented with a Genode C API for the narrow scope of
porting device drivers). Therefore adding native Rust bindings would
entail defining a Genode ABI so that the Rust API can be implemented
independently from the C++ implementation.
> I thought of working with the Gnode api to create a transition layer
so that components written in rust can directly work with the api. Would
this be a project be helpful or would something else be more appropriate?
Our road map[1] goal of Rust-based components for an email scenario is
meant as an opportunity to venture from components that run purely on
the libc / POSIX ABI towards incorporating native interfaces. In that,
your suggestion goes in the right direction. However, instead of
attempting to create a whole transition layer, I would suggest that you
approach this from building a specific Genode component. Get the
examples from the Genode Foundations book[2] to work if you haven't
already, then build a libc-based Rust package with Goa (see [3] for an
example) and explore creating the necessary bindings for a native Rust
component from there.
Maybe others from the Genode team can share their perspective on this,
but from previous discussions within Genode Labs (cf. this mailing list
post: [4]), my hunch is that if we build an official Genode Rust API, it
will be implemented from scratch on a future Genode ABI. Rust bindings
based on Rust's FFI will likely play a role on the path towards this
goal, so we welcome you experimenting with this. Just be advised that a
sort of "genode-rs" translation layer that is based on a FFI to the C++
API is unlikely to be the long term solution that we at Genode Labs will
endorse.
I hope this clarifies our vision for Rust on Genode a bit. Enjoy
experimenting!
Best wishes,
Ben
[1] https://genode.org/about/road-map
[2]
https://genode.org/documentation/genode-foundations/23.05/getting_started/Hello_world.html
[3] https://genodians.org/atopia/2023-10-26-a-first-complex-rust-package
[4]
https://lists.genode.org/mailman3/hyperkitty/list/[email protected]/message/EQIT63S75WQB6HTNU7I7SU4KWWZ5TYOD/
--
Benjamin Lamowski
Genode Labs
https://www.genode-labs.com · https://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Archived at
https://lists.genode.org/mailman3/hyperkitty/list/[email protected]/message/55VGDSC43D6WIDULWVU5KE2AZNE4DQWZ/