Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
SHELL := /bin/bash

GO_VERSION ?= 1.26.2
TINYGO_VERSION ?= 0.41.1

.PHONY: test
test:
@PATH=$(CURDIR)/misc/wasm:$$PATH GOOS=js GOARCH=wasm go test ./...
Expand All @@ -12,3 +15,7 @@ build-examples:
cd $$dir && GOOS=js GOARCH=wasm go build -o ./build/app.wasm; \
cd ../../; \
done

.PHONY: gen-wasm-exec
gen-wasm-exec:
cd scripts/gen-wasm-exec && pnpm run gen --go $(GO_VERSION) --tinygo $(TINYGO_VERSION)
2 changes: 1 addition & 1 deletion cmd/workers-assets-gen/assets/wasm_exec_go.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,4 +580,4 @@
};
}
}
})();
})();
3 changes: 2 additions & 1 deletion cmd/workers-assets-gen/assets/wasm_exec_tinygo.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
if (prop === 'context') {
return context;
}
return Reflect.get(...arguments);
return Reflect.get(target, prop, target);
}
})
this._values = [ // JS values that Go currently has references to, indexed by reference id
Expand Down Expand Up @@ -550,6 +550,7 @@
};
}
}

/*
if (
global.require &&
Expand Down
1 change: 1 addition & 0 deletions scripts/gen-wasm-exec/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
20 changes: 20 additions & 0 deletions scripts/gen-wasm-exec/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "gen-wasm-exec",
"version": "0.0.0",
"private": true,
"type": "module",
"engines": {
"node": ">=24.0.0"
},
"scripts": {
"gen": "node src/index.ts",
"typecheck": "tsc --noEmit"
},
"packageManager": "pnpm@11.0.4",
"devDependencies": {
"@types/jscodeshift": "^17.3.0",
"@types/node": "^25.6.0",
"jscodeshift": "^17.3.0",
"typescript": "^6.0.3"
}
}
Loading
Loading