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

Make it compile to wasm32-unknown-unknown #15

Open
6 tasks done
MrishoLukamba opened this issue Dec 17, 2024 · 2 comments · May be fixed by #18
Open
6 tasks done

Make it compile to wasm32-unknown-unknown #15

MrishoLukamba opened this issue Dec 17, 2024 · 2 comments · May be fixed by #18

Comments

@MrishoLukamba
Copy link
Contributor

MrishoLukamba commented Dec 17, 2024

This is part of one changes as the whole codebase should compile to wasm32-unknown-unknown target.

  • Make it compile to wasm and obtain wasm blob
  • primitives crate
  • convert all RPC to wasm bindgen functions ( same functionalities just handle differently than RPC websockets and HTTP)(tip issue)
  • db crate
  • make libp2p swarm protocol compile to wasm (medium issue)
  • make tx processing compile to wasm (medium issue)

Things to consider

  • Use tokio_with_wasm crate to work around async code
  • Use wasm_bindgen for rpc functions as we wouldnt use RPC so they will be just normal exported functions
  • run to check if the code can be compiled to wasm32
    cargo check --target wasm32-unknown-unknwon
@nutcas3
Copy link

nutcas3 commented Dec 23, 2024

hello can you point me to the exact files that needs to be changed to the converting to rpc to wasm kindly I can open a pr in a day

@MrishoLukamba
Copy link
Contributor Author

hello can you point me to the exact files that needs to be changed to the converting to rpc to wasm kindly I can open a pr in a day

Node/rpc

And check how i handled db crate

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

Successfully merging a pull request may close this issue.

2 participants