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

Problem with building for WASM/WASI target #312

Open
orzel7 opened this issue Sep 8, 2024 · 1 comment
Open

Problem with building for WASM/WASI target #312

orzel7 opened this issue Sep 8, 2024 · 1 comment

Comments

@orzel7
Copy link

orzel7 commented Sep 8, 2024

I've tried to build this code to web assembly, and it fails:
`
GOOS=wasip1 GOARCH=wasm tinygo build -o main.wasm main.go
go: downloading github.com/tdewolff/minify/v2 v2.20.5
go: downloading github.com/tdewolff/font v0.0.0-20240728193914-9dc6e3441d03
go: downloading golang.org/x/text v0.16.0
go: downloading github.com/go-text/typesetting v0.0.0-20231013144250-6cc35dbfae7d
go: downloading github.com/go-fonts/latin-modern v0.3.1
go: downloading github.com/tdewolff/parse/v2 v2.7.15
go: downloading golang.org/x/net v0.24.0
go: downloading golang.org/x/image v0.18.0
go: downloading github.com/andybalholm/brotli v1.1.0

star-tex.org/x/tex/internal/xtex

../../../../go/pkg/mod/star-tex.org/x/[email protected]/internal/xtex/ctx.go:33:11: undefined: os.Chdir
../../../../go/pkg/mod/star-tex.org/x/[email protected]/internal/xtex/ctx.go:35:11: undefined: os.Chdir
`
I realize tinygo is not 100% compatible with go, but if this project claims to be WASM compatible, it would be nice to take a closer look at the problem

@tdewolff
Copy link
Owner

Maybe try with the latex build tag, that would use the system's LaTeX implementation. Does that work?

Repository owner deleted a comment Oct 24, 2024
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

No branches or pull requests

2 participants