Skip to main content

Questions tagged [go-wasm]

The tag has no usage guidance.

0 votes
0 answers
37 views

I keep getting a deadlock error any time i attempt to make an api call in golang compiled to wasm

As the title describes i am trying to make an api call in golang that is compiled to wasm it works fine when it is run on a machine but returns a deadlock error all go routines asleep whenever i run ...
Crowbin's user avatar
  • 29
1 vote
1 answer
34 views

How do I import a golang compiled WASM function into js and use it?

I am trying to import a function from my golang WASM file to use in javascript but anytime i try and use the function i get a undefined error. But if i import my WASM file and then use the console i ...
Crowbin's user avatar
  • 29
0 votes
1 answer
458 views

Loading brotli compressed WASM

I have a brotli compressed WASM file main.wasm.br. I have compressed this manually via CLI. Currently in my HTML file I have below - <!DOCTYPE html> <html lang="en"> <head>...
ArunKolhapur's user avatar
  • 6,555
3 votes
3 answers
1k views

Will Go 1.21 include ability to host http via WebAssembly? How?

I'd like to try an http server via WebAssembly on Go. I think that compiling go for webassembly outside the browser is not supported in go 1.20, and that the net/http libraries aren't included in ...
Tyler's user avatar
  • 55
1 vote
1 answer
220 views

How can I pass an array of string `string[]` from js to go using `syscall/js`

having this go function func WasmCount(this js.Value, args []js.Value) interface {} { const firstParam = args[0].ArrayOfString() // <-- I want to achieve this return firstParam.Length } and I ...
amd's user avatar
  • 21.2k
2 votes
1 answer
1k views

Export function from GO compiling WASM

Hi I want to make a compile a GO file intro WASM and run in from a node server. In the index.html i have this: <script src="./path_to/wasm_exec.js" ></script> <script&...
Baelfire18's user avatar
1 vote
2 answers
2k views

How can I run a Go WASM program using Node.js?

I created a test WASM program using Go. In the program's main, it adds an API to the "global" and waits on a channel to avoid from exiting. It is similar to the typical hello-world Go WASM ...
Zhou's user avatar
  • 673
1 vote
0 answers
263 views

How do I compile an existing C++ ibrary using sockets to WASM?

I have some existing server code written in C++, Node.js and Python that I would like to port to WASM. This code makes heavy use of UDP/TCP sockets. Ideally with little to no modification of the code. ...
Isaac Monteath's user avatar
2 votes
0 answers
264 views

Envoy WASM filter fails to load due to missing import: wasi_snapshot_preview1.fd_filestat_get

I am trying to create an Envoy filter using Golang WASM. As soon as I add the following import: "google.golang.org/protobuf/proto" And the following usage under OnHttpRequestBody: func (ctx *...
Ohad's user avatar
  • 323
2 votes
0 answers
84 views

How to show progress during upload asynchronously with WASM

I am currently using Go WASM to upload a file to a server. During the upload it shall emit a call to update the upload progress in the UI. I am currently using the following struct to have an ...
Force's user avatar
  • 6,372