Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting bare metal embedded environments #220

Open
lulf opened this issue Jul 1, 2022 · 3 comments
Open

Supporting bare metal embedded environments #220

lulf opened this issue Jul 1, 2022 · 3 comments

Comments

@lulf
Copy link

lulf commented Jul 1, 2022

Hi, we're a bunch of developers playing with Industrial IoT over at Drogue IoT, and I'm looking into writing an OPC-UA server that can run on embedded devices, preferably in pure Rust :)

To run a Rust crate on bare metal embedded devices, it must be able to compile without the standard library (i.e. have the no_std flag enabled in the crate lib).

Obviously, this is not feasible with the full set of features turned on, but I'm wondering if you'd be open to extract a subset of the lib, specifically the type system (types module?), into a separate crate with the aim of making that crate consumable by both std and no_std environments. The easiest way to do this is by creating a separate crate with all the stuff that can compile to bare metal and std environments like and expose features for enabling 'std' support.

I'm willing to give this a try, but I'd like to know if it's something this project would be interested in if I submitted it.

@jon-ton
Copy link

jon-ton commented Jul 19, 2022

I think this would be really interesting/helpful to have in the crate.

@schroeder-
Copy link
Contributor

Most of types part is out generated, so the code could be reused to generate a embedded version for an embedded opc ua crate. But the amount of generated structs which bloats the binary. So for the embedded part only a subset is needed.

The server and client code uses tokio which doesn't work with no_std. So there isn't much code to reuse.

The rest is just the crypto part, which depends on openssl, which isn't available for all embedded targets.

@JuliDi
Copy link

JuliDi commented Jul 10, 2024

Any news on this?
@lulf were you able to make it work with no_std?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants