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

support no_std #370

Open
smallstepman opened this issue Jul 25, 2022 · 2 comments
Open

support no_std #370

smallstepman opened this issue Jul 25, 2022 · 2 comments

Comments

@smallstepman
Copy link

smallstepman commented Jul 25, 2022

A user asked a question on the forum https://forum.dfinity.org/t/about-iot-using-dfinity/14518

Is it currently possible to compile ic-agent with no_std flag?

@adamspofford-dfinity
Copy link
Contributor

adamspofford-dfinity commented Aug 2, 2022

You need an operating system to have a network socket. We are not about to implement a network card driver for ic-agent. IoT devices typically have an androidlike operating system, so a no-std mode would not be necessary either.

@smallstepman
Copy link
Author

no one is talking about implementing network card drivers here ;p

could you link the "IoT androidlike OS" you're referring to?

I can't think of a straightforward way to install ic-agent on something like RPi Pico. I guess the first thing I'd try is to install ZephyrOS and then try to somehow add ic-agent to the mix, although I'd still have to bridge C++ and Rust. I'm not sure if/how Zephyr would be able to expose the network socket from C++ to Rust ic-agent.

Perhaps it would be a good idea to put network stuff behind feature flags? Then flag with pub all functions that generate (or interpret) the content of network requests. What do you think?

Another option would be to split ic-agent into

  • ic-agent-core - cryptography, generation/interpretation of network requests/responses
  • ic-agent-network-wrapper-what-a-great-name = ic-agent-core + hyper-rustls + async

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

2 participants