hennedo / escpos

golang library for espos printers, supporting images, barcodes and qr codes
MIT License
70 stars 29 forks source link

WASM build failing #19

Open apuatcfbd opened 8 months ago

apuatcfbd commented 8 months ago

I'm trying to put it in WASM to be used with JS (in browser). But WASM build is failing. Build cmd GOOS=js GOARCH=wasm go build -o main.wasm main.go

error

# github.com/qiniu/iconv
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/reader.go:11:11: undefined: Iconv
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/reader.go:19:19: undefined: Iconv
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/reader.go:21:13: undefined: DefaultBufSize
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/reader.go:49:14: undefined: EILSEQ
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/writer.go:12:11: undefined: Iconv
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/writer.go:19:19: undefined: Iconv
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/writer.go:21:13: undefined: DefaultBufSize
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/writer.go:70:15: undefined: EILSEQ
/home/user/go/pkg/mod/github.com/qiniu/iconv@v1.2.0/writer.go:102:15: undefined: EILSEQ
apuatcfbd commented 8 months ago

@justinmichaelvieira 's pr is working fine

justinmichaelvieira commented 8 months ago

@apuatcfbd makes sense, since my pr fully removes the qiniu/iconv dependency :)

justinmichaelvieira commented 8 months ago

https://github.com/hennedo/escpos/pull/14 closes this