iansmith / parigot

Develop as a monolith, deploy as microservices.
https://parigot.info
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

fix startup args passed to the wasm level #4

Open iansmith opened 1 year ago

iansmith commented 1 year ago

currently this code inside a warm module will fail:

flag.Parse()

because there are zero command line arguments.

A minimal fix would be to pass the name of the warm module as arg[0] which would allow flag.Parse() to trivially work. It would be better if command line flags could be passed to the warm module, although this probably means changes to runner and the docker-compose to allow the passing of args.

iansmith commented 1 year ago

This was found in the go-supplied file wasm_exec.js lines 488 to 518 in the 1.19 distribution.