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

Unable to compile to wasm #71

Closed
Titanium-ctrl opened this issue Jan 12, 2021 · 2 comments
Closed

Unable to compile to wasm #71

Titanium-ctrl opened this issue Jan 12, 2021 · 2 comments
Labels
help wanted Calling for community PR/volunteer

Comments

@Titanium-ctrl
Copy link

Titanium-ctrl commented Jan 12, 2021

I have a script in Go that uses uTLS however when I try to compile it to wasm using GOOS=js GOARCH=wasm go build -o main.wasm client.go I get the error shown below:

#github.com/refraction-networking/utls/cpu
../go/pkg/mod/github.com/refraction-networking/utls@v0.0.0-20201210053706-2179f286686b/cpu/cpu.go:16:16: undefined: CacheLineSize

../go/pkg/mod/github.com/refraction-networking/utls@v0.0.0-20201210053706-2179f286686b/cpu/cpu.go:33:16: undefined: CacheLineSize

../go/pkg/mod/github.com/refraction-networking/utls@v0.0.0-20201210053706-2179f286686b/cpu/cpu.go:46:14: undefined: CacheLineSize

../go/pkg/mod/github.com/refraction-networking/utls@v0.0.0-20201210053706-2179f286686b/cpu/cpu.go:58:14: undefined: CacheLineSize

../go/pkg/mod/github.com/refraction-networking/utls@v0.0.0-20201210053706-2179f286686b/cpu/cpu.go:66:14: undefined: CacheLineSize

../go/pkg/mod/github.com/refraction-networking/utls@v0.0.0-20201210053706-2179f286686b/cpu/cpu.go:76:14: undefined: CacheLineSize

What I expected to happen: build to succeed without error

When building to Linux or Windows binaries it works fine. However I get this issue with building to wasm. Please can someone let me know what I would need to do to make this build work, or if this build isn't possible.

@sergeyfrolov
Copy link
Member

Looks like we'll need to copy a config file for this architecture from standard's go lib to cpu folder of this repo

@sergeyfrolov sergeyfrolov added the help wanted Calling for community PR/volunteer label Jul 13, 2021
@gaukas
Copy link
Contributor

gaukas commented Nov 9, 2022

Fixed in #120.

@gaukas gaukas closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Calling for community PR/volunteer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants