Skip to content

Wasm compilation failing #109

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

Closed
josediegorobles opened this issue Jul 8, 2022 · 4 comments · Fixed by #142
Closed

Wasm compilation failing #109

josediegorobles opened this issue Jul 8, 2022 · 4 comments · Fixed by #142
Assignees
Labels
bug Something isn't working *compatibility* Issues affecting compatibility and interoperability
Milestone

Comments

@josediegorobles
Copy link

I have this problems (and are the same problems with this an other libraries like rgb-node since month ago):

image

It finnally comes that is rustc-serialize that is deprecated in favour of serde but is being used by grin_secp256k1zkp.

I see this issue of yours:

#9

How is the issue going, there are plans to substitute one for another, it's possible to contribute to that?

Thanks

@dr-orlovsky
Copy link
Member

The issue depends on secp256k1-zkp and nobody is working on it. I am out of professional capacity of doing this cryptography stuff :( I had even proposed grants; but all cryptographers who is able to implement lack not money but time.

@josediegorobles
Copy link
Author

Thanks! It's much clearer for me now the situation.

@dr-orlovsky dr-orlovsky added this to the v0.10.0 milestone Jan 24, 2023
@dr-orlovsky dr-orlovsky added bug Something isn't working *compatibility* Issues affecting compatibility and interoperability labels Jan 24, 2023
@crisdut
Copy link
Member

crisdut commented Feb 7, 2023

Hi @dr-orlovsky,

After update to v0.10, I tried compiling with wasm-pack build and occurs this error:

image

After investigate, I noticed this configuration in syn library:

image

We need change all parse() to parse2() in amplify_syn lib.

Also, I made some changes in Cargo.toml to work with wasm-pack:

[package]
name = "rgb-core"
version = "0.10.0-beta.1"
authors = ["Dr Maxim Orlovsky <[email protected]>"]
(...)
[lib]
name = "rgb"
crate-type = ["cdylib", "rlib"] # <--- HERE
(...)
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }  # <--- HERE

I hope this help.

@dr-orlovsky
Copy link
Member

@crisdut thank you for all the details and investigation of the fix. I have applied it here: rust-amplify/amplify-derive#36

I will do a new release now - and update RGB Core dependency version, adding WASM CI. Let's see would it solve the issue

@dr-orlovsky dr-orlovsky linked a pull request Feb 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working *compatibility* Issues affecting compatibility and interoperability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants