chore: add tooling for go wasm
This commit is contained in:
parent
46f1576b8f
commit
f9751f5ab2
5 changed files with 61 additions and 0 deletions
27
mise.toml
Normal file
27
mise.toml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
[tools]
|
||||
"go" = "1.24.4"
|
||||
"node" = "22"
|
||||
|
||||
[tasks.copy-wasm-shim]
|
||||
alias = ["gojs"]
|
||||
description = "Copies Go's wasm_exec.js to the public directory"
|
||||
run = [
|
||||
"echo $(go version) > public/wasm_exec.js",
|
||||
"cat $(go env GOROOT)/lib/wasm/wasm_exec.js >> public/wasm_exec.js",
|
||||
]
|
||||
|
||||
[tasks.build-go-wasm]
|
||||
alias = ["wasm"]
|
||||
depends = ["copy-wasm-shim"]
|
||||
description = "Builds the Go WebAssembly module for Tailscale SSH"
|
||||
env = { GOOS = "js", GOARCH = "wasm" }
|
||||
run = "go build -o public/hp_ssh.wasm ./cmd/hp_ssh"
|
||||
|
||||
[tasks.generate-caddy-certs]
|
||||
alias = ["mkcert"]
|
||||
dir = "{{cwd}}/test/caddy/certs"
|
||||
run = [
|
||||
"mkdir -p {{cwd}}/test/caddy/certs",
|
||||
"mkcert -install",
|
||||
"mkcert localhost"
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue