-
Notifications
You must be signed in to change notification settings - Fork 28
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
WIP: Add Wasm compatibility and allow it to run async #69
WIP: Add Wasm compatibility and allow it to run async #69
Conversation
Excellent work. |
Great, I would be eager to contribute to async-ssh-rs. Is it possible to limit the usage of ring-rs and tokio? or at lease flags it for targets that allows these library and keep it generic so I can contribute the to the code to make it works for wasm-unkown-unknown. we currently using Golang for this purpose, even though it works, but it is not a great solution. Please let me know when you have the repository ready. I am more than happy to contribute. Best Regards, |
Sure. Glad to have your contribution! But some questions about the limited usage of Are there any necessary reasons that we must use BRs. |
It does compile, but it does not necessarily work, here's more information about it, and they does not yet have plan to support it. |
Afaik, the |
That's true; I correct what I said. wasm32-unknown-unknown is only partially supported by async-std. In this case, please go ahead and implement it as you see fit. I'll contribute to make it more suitable for people who need to run it in a browser environment like myself. Thank you very much, and please keep me updated. By the way, could you please avoid using Ring-rs for cryptographic features? It's not compatible with any WebAssembly environment because it rely on native assembly code. If you absolutely need the functionalities that Ring-rs offers, consider creating an adapter layer. This way, I can plug in a pure Rust-implemented crypto library or Web Crypto API. Thanks again. |
work still in progress, it now communicates with a remote ssh server through a websocket proxy using async_session and websocket stream.
As ring library does not support browser currently, we need to replace ring with[ this patch](https://github.com/irvingoujAtDevolution/ring-xous/tree/irving/wasm-support
you need wasm_bindgen and wasm_bindgen_future for it to run,
Currently, it fails at verifying server key. As I have limited knowledge of cryptography, I would love to receive some help from the community, it would be better if we could use encryption libraries built on pure rust. and I am willing to keep contributing after this is resolved.
usage: