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

Be fully no_std compatible (except for ws rpc) #279

Closed
haerdib opened this issue Sep 12, 2022 · 3 comments · Fixed by #377
Closed

Be fully no_std compatible (except for ws rpc) #279

haerdib opened this issue Sep 12, 2022 · 3 comments · Fixed by #377
Assignees
Labels
F7-enhancement Enhances an already existing functionality Q9-needsdesign Z4-proposed

Comments

@haerdib
Copy link
Contributor

haerdib commented Sep 12, 2022

Would include hosting a ws client in no-std. To my knowledge, this is not yet available as a library.

@clangenb
Copy link
Collaborator

We do not necessarily need a ws-client, just any networking interface that implements the RpcClient or the subscriber.

The cool thing is, some no_std libraries provide their own networking abstractions, like we have it in SGX. Hence, it is already a very useful thing to provide everything in no_std except the ws-client.

As the main part is already generic over the the traits above, we should be able to make almost everything no_std compatible by now.

@haerdib
Copy link
Contributor Author

haerdib commented Nov 16, 2022

I have looked into it a little. Making the api-client no_std compatible is not that much work at all, if one leaves out the ws-client. If #267 is done, I think most of it should be solved already. If one leaves out the ws-client.

Regarding the ws-client:
I haven't found anything (once again) that is no_std even nearly no_std compatible. tungstenite seems to be a fairly simple one, so one could look into that to see how much needs to done to make it no_std compatible. Maybe even a from scratch implementation is necessary. But what's certain: a no_std client will need to be fairly simple and slow. No async, no multithreading, no mio. And a lot of work. Not sure if that's worth it. Maybe a fire-and-forget client is somewhat more reasonable.

Seems to a fairly useful http-client list: https://lib.rs/web-programming/http-client

@clangenb
Copy link
Collaborator

Networking does usually need the very low-level primitives that interface with the hardware. I don't actually expect a generic no_std websocket client to be available at all. It is much more likely that the ws_client will be supplied by the user of the library, like our sgx compatible one, or one that is supplied by a browser lib.

@haerdib haerdib self-assigned this Dec 9, 2022
@haerdib haerdib changed the title Be fully no_std compatible Be fully no_std compatible (expect for ws rpc) Dec 16, 2022
@haerdib haerdib changed the title Be fully no_std compatible (expect for ws rpc) Be fully no_std compatible (except for ws rpc) Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F7-enhancement Enhances an already existing functionality Q9-needsdesign Z4-proposed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants