INNER CODE UNIT · Go

main

container2wasm/container2wasm · cmd/c2w-net/main.go:27

func main() {
	var portFlags sliceFlags
	flag.Var(&portFlags, "p", "map port between host and guest (host:guest). -mac must be set correctly.")
	var (
		debug         = flag.Bool("debug", false, "enable debug print")
		listenWS      = flag.Bool("listen-ws", false, "listen on a websocket port specified as argument")
		enableTLS     = flag.Bool("enable-tls", false, "enable TLS for the websocket connection")
		wsCert        = flag.String("ws-cert", "", "TLS cert for ws connection")
		wsKey         = flag.String("ws-key", "", "TLS key for ws connection")
		invoke        = flag.Bool("invoke", false, "invoke the container with NW support")
		mac           = flag.String("mac", vmMAC, "mac address assigned to the container")
		wasiAddr      = flag.String("wasi-addr", "127.0.0.1:1234", "IP address used to communicate between wasi and network stack (valid only with invoke flag)") // TODO: automatically use empty random port or unix socket
		wasmtimeCli13 = flag.Bool("wasmtime-cli-13", false, "Use old wasmtime CLI (<= 13)")
	)
	flag.Parse()
	args := flag.Args()
	if len(args) < 1 {
		panic("specify args")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…