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

add wasm support #700

Merged
merged 18 commits into from
Nov 14, 2022
Merged

add wasm support #700

merged 18 commits into from
Nov 14, 2022

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Oct 25, 2022

Co-authored by @Xanewok

@Xanewok Xanewok linked an issue Oct 26, 2022 that may be closed by this pull request
subxt/src/lib.rs Outdated Show resolved Hide resolved
@niklasad1 niklasad1 changed the title WIP: wasm support add wasm support Nov 10, 2022
@niklasad1 niklasad1 marked this pull request as ready for review November 10, 2022 17:09
@niklasad1 niklasad1 requested a review from a team as a code owner November 10, 2022 17:09
wasm-tests/Cargo.toml Outdated Show resolved Hide resolved
wasm-tests/tests/wasm.rs Outdated Show resolved Hide resolved
Comment on lines 64 to 67
#[cfg(any(
all(feature = "jsonrpsee-ws", not(target_arch = "wasm32")),
all(feature = "jsonrpsee-web", target_arch = "wasm32")
))]
Copy link
Collaborator

@jsdw jsdw Nov 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a check at the root lib.rs to make sure that somebody cannot enable both of these jsonrpsee features simultaneously?

What are the pros and cons for also having this target_arch check as well as just checking the features? It'd be nice if we could just check for a feature and not worry about the rest, for simplicity

Copy link
Member Author

@niklasad1 niklasad1 Nov 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a check at the root lib.rs to make sure that somebody cannot enable both of these jsonrpsee features simultaneously?

Sure

What are the pros and cons for also having this target_arch check as well as just checking the features? It'd be nice if we could just check for a feature and not worry about the rest, for simplicity

It's my own fault in jsonrpsee i.e, it won't compile without the target_arch

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that makes sense! Is it worth filing an issue/PR in jsonrpsee to tweak that so we can simplify here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I can take a look if it's possible to remove those

Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Would be ncie if we could slightly simplify the feature flags but it's not a blocker to getting this merged!

Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Can't wait to build a toy web app with this 😎

subxt/Cargo.toml Show resolved Hide resolved
@ascjones ascjones merged commit 14e8e6f into master Nov 14, 2022
@ascjones ascjones deleted the na-wasm-support branch November 14, 2022 11:45
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

Successfully merging this pull request may close these issues.

Support compiling Subxt to WASM
4 participants