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

Allow to compile client to webassembly #23046

Closed

Conversation

maxmati
Copy link

@maxmati maxmati commented Jun 15, 2021

We try to use ethereum contract in webassembly but it was failing due to
some symbols missing. To fix this I disabled compilation of some modules
for js tag.

@fjl
Copy link
Contributor

fjl commented Jul 27, 2021

accounts/abi/bind/auth.go does not compile because it depends on accounts/external, which depends on signer/core, which does not compile under WebAssembly. We will fix it by removing the dependency on signer/core.

@fjl
Copy link
Contributor

fjl commented Jul 29, 2021

The dependency is now removed.

Comment on lines +17 to +18
// +build !js

Copy link
Contributor

Choose a reason for hiding this comment

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

This should no longer be needed, after the change in #23275

Copy link
Author

Choose a reason for hiding this comment

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

Unfortunately this change wasn't enough, here is what I get:

        imports github.com/ethereum/go-ethereum/accounts/abi/bind
        imports github.com/ethereum/go-ethereum/accounts/external
        imports github.com/ethereum/go-ethereum/signer/core/apitypes
        imports github.com/ethereum/go-ethereum/internal/ethapi
        imports github.com/ethereum/go-ethereum/consensus
        imports github.com/ethereum/go-ethereum/core/state
        imports github.com/VictoriaMetrics/fastcache
        imports golang.org/x/sys/unix: build constraints exclude all Go files in /home/maxmati/go/pkg/mod/golang.org/x/sys@v0.0.0-20210510120138-977fb7262007/unix

I don't know go-ethereum at all so it's hard to fix for me.

We try to use ethereum contract in webassembly but it was failing due to
some symbols missing. To fix this I disabled compilation of some modules
for js tag.
@fjl
Copy link
Contributor

fjl commented Aug 23, 2021

We have merged another update to remove more dependencies of accounts/abi/bind, it should compile now.

@fjl
Copy link
Contributor

fjl commented Aug 24, 2021

Since I can't edit this PR, I have re-sent the metrics change in #23449.

@fjl fjl closed this Aug 24, 2021
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.

4 participants