-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path to wasm_exec.js changed for go 1.24 #16
Comments
old $(GOROOT)/misc/wasm/wasm_exec.js new go 1.24 $(GOROOT)/lib/wasm/wasm_exec.js |
tinygo for go 1.24 tracking issue: tinygo-org/tinygo#4719 |
Oh hey, These are being fixed here. https://github.com/metacatdud/orbital/tree/refactor/wasm-engine This is WIP. I took a detour bigger than I wanted 😅 Also, I didn't took tinygo into account here. |
I will need to add some github actions to create releases. That Also, maybe I will need to add some sort of command in taskfile to asses if a dev has everything in order to be able to work |
Cool You can often use a taskfile in GitHub actions btw. I am a bit sick . Flu thing , so not pulling code until I feel better etc |
Yeah, I know. But is not in the scope right now. If we see any utility we can separate the wasm as a separate project an think of a solution than PS. Get well soon |
Hey @metacatdud back in business. Needs to just sleep and chill for a bit. Pulled code on branch "refactor/wasm-engine" orbital/web/wasm/pkg/storage is where I got stuck. You did too ? Anything I can do to help ? |
I have just pushed with what I think is close to what I imagined. I tried around 30 iterations. My brain is mush. I think containing the logic at the component without ANY "framework" it is a bit of wishful thinking. I will take a small break PS. What do you mean you got stuck at A very short and brief installation:
3.1 Running without
|
Thanks for the instructions. I will try it out and give a full reproduction if I get stuck so we can team work it. . |
Same issue as before with storage. On the refactor/wasm-engine branch. Maybe just a go mod override you have on your side ? happens all the time.. cd web/wasm && GOOS=js GOARCH=wasm go build -o /Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/.bin/orbital_wasm_bin_js_wasmgo
pkg/di/di.go:6:2: package orbital/web/wasm/pkg/storage is not in std (/opt/homebrew/opt/go/libexec/src/orbital/web/wasm/pkg/storage) I use a specialised Make file ( cause life is short ) but you can see what I am doing. MAKEFILE: LD_FLAGS="-s -w -X main.Version=$(BASE_SRC_VERSION_WHICH) -X main.Compile=$(BASE_SRC_VERSION_WHICH) -X main.Branch=$(BASE_SRC_VERSION_WHICH)"
BASE_BIN_GO_BUILD_CMD:=CGO_ENABLED=0 $(BASE_DEP_BIN_GO_NAME) build -tags= -buildvcs=false -ldflags $(LD_FLAGS)
this-bin: base-bin-init base-bin-init-golang
$(MAKE) base-bin
$(MAKE) this-bin-wasm
WASM_BIN_MOD=.
WASM_BIN_ENTRY=web/wasm
WASM_BIN_NAME=$(BASE_BIN_NAME)_wasm
WASM_BIN_CMD=BASE_BIN_MOD=$(WASM_BIN_MOD) BASE_BIN_ENTRY=$(WASM_BIN_ENTRY) BASE_BIN_NAME=$(WASM_BIN_NAME)
this-bin-wasm:
# first web / wasm..
# I am just doing what his make file does.
$(MAKE) $(WASM_BIN_CMD) base-mod-tidy
# css
cd $(BASE_SRC)/web/tailwind && $(BUN_DEP_NATIVE) install && $(BUN_DEP_NATIVE) run tailwindcss -i ./orbital.scss -o $(BASE_SRC)/web/orbital.css
# wasm
$(MAKE) $(WASM_BIN_CMD) base-bin-wasm
#$(MAKE) $(BOOKS_BIN_CMD) base-bin-wasm-tiny
# brotli
$(MAKE) ARG=$(WASM_BIN_NAME) base-bin-arc-brotli-compress SH at the point of the wasm build. All the other stuff works fine. bun works fine btw. works on every nom, yarn stuff I ever hit. cd /Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/.src/orbital && go mod tidy
make[2]: Leaving directory '/Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital'
# css
cd /Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/.src/orbital/web/tailwind && bun_bin_darwin_arm64 install && bun_bin_darwin_arm64 run tailwindcss -i ./orbital.scss -o /Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/.src/orbital/web/orbital.css
bun install v1.1.38 (bf2f153f)
[5.36ms] migrated lockfile from package-lock.json
Saved lockfile
+ autoprefixer@10.4.20
+ npm@10.9.0
+ postcss@8.4.49
+ postcss-cli@11.0.0
+ tailwindcss@3.4.15
+ postcss-import@16.1.0
+ sass@1.81.0
167 packages installed [147.00ms]
Blocked 1 postinstall. Run `bun pm untrusted` for details.
Rebuilding...
Done in 111ms.
# wasm
make BASE_BIN_MOD=. BASE_BIN_ENTRY=web/wasm BASE_BIN_NAME=orbital_wasm base-bin-wasm
make[2]: Entering directory '/Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital'
fatal: No names found, cannot describe anything.
# golang
--- golang wasm ---
cd /Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/.src/orbital && cd web/wasm && GOOS=js GOARCH=wasm go build -o /Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/.bin/orbital_wasm_bin_js_wasmgo
pkg/di/di.go:6:2: package orbital/web/wasm/pkg/storage is not in std (/opt/homebrew/opt/go/libexec/src/orbital/web/wasm/pkg/storage)
make[2]: *** [/Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital/../../base.mk:1974: base-bin-wasm] Error 1
make[2]: Leaving directory '/Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital'
make[1]: *** [Makefile:106: this-bin-wasm] Error 2
make[1]: Leaving directory '/Users/apple/workspace/go/src/github.com/gedw99/kanka-cloudflare/modules/wasm/metacatdud__orbital'
make: *** [Makefile:89: this-bin] Error 2
|
Do you store your projects in $HOME/go? I have something like $HOME/projects, all my projects are in one place despite the language. I don't have this issue, and honestly don't know how to reproduce, I will try to put the project in GOPATH. I don't have access to an apple, but I don't think is the case. |
I think it's trying to reference this as module: github.com/gedw99/kanka-cloudflare/ or the module in the project is If so, you need to start replacing the entire project Example package di
import (
"orbital/web/wasm/pkg/events"
"orbital/web/wasm/pkg/state"
"orbital/web/wasm/pkg/storage"
"orbital/web/wasm/templates"
) change to package di
import (
"github.com/gedw99/kanka-cloudflare/web/wasm/pkg/events"
"github.com/gedw99/kanka-cloudflare/web/wasm/pkg/state"
"github.com/gedw99/kanka-cloudflare/web/wasm/pkg/storage"
"github.com/gedw99/kanka-cloudflare/web/wasm/templates"
) See if this works. Do you try to use the wasm part on a different project? Could you give me a bit more context? I can't reproduce this issue (Mostly because I don't know how). Like I said, I had some strange path referencing issues before I never considered WASM a separate project (Not soon at least) |
I am just making an update and I've noticed I accidentally added that storage in ignore and it's not there. |
There we go . Easy one . Will try again today . |
Leave it for now. I am still redoing some composition flows. I can't decide which is better:
I will do some more iterations next week. I am beat, but it starts to get there :) |
no worries mate !! Take a rest and breath... |
easy fix...
https://tip.golang.org/doc/go1.24#wasm
The text was updated successfully, but these errors were encountered: