-
Notifications
You must be signed in to change notification settings - Fork 126
Can't compile to wasm #136
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
Comments
This is most likely due to std leakage of the dev-dependencies. the master branch includes a fix that should solve this: #120 |
The fix only solves your issue if the api-client is the top-level crate, otherwise you need to add "resolver = 2" to your top-level Cargo.toml. |
@clangenb Does not seem to work by adding |
@clangenb https://github.com/DylanVerstraete/rust-wasm-substrate/blob/master/Cargo.toml can you check this repo please? |
Well, when you want to compile to wasm you need to disable the std-features of the api-client with But this will strip most functionality. |
I can't compile to wasm without disabling std-features? |
I have just checked up on that and found out that std does not inherently break wasm support - but some std-libs do. So, I reckon we'd need to make some adjustments to be able to support wasm with the std feature enabled. Without should be fine - as far as I know. |
If I disable default-features I get:
|
There seemed to be a tiny feature-flag bug on our side. Fixed in #137 |
@clangenb okay, will I be able to do anything with the client without std-features? |
Currently, it is essentially the |
@clangenb although it compiles now I get following error trying to import the API
|
If you disabled std in the client you ony get access to
|
The text was updated successfully, but these errors were encountered: