Skip to content

refactor: migrate build and runtime assets to project-local dist#1233

Draft
aofei wants to merge 1 commit intogoplus:devfrom
aofei:release
Draft

refactor: migrate build and runtime assets to project-local dist#1233
aofei wants to merge 1 commit intogoplus:devfrom
aofei:release

Conversation

@aofei
Copy link
Copy Markdown
Member

@aofei aofei commented Feb 6, 2026

Restructure build and release workflows so SPX artifacts are produced and consumed from dist/ instead of $GOPATH/bin. This makes local builds and packaged goenv releases use the same layout.

Build and packaging:

  • add scripts/build.sh, scripts/setup-engines.sh, scripts/setup-web-template.sh, and scripts/verify-goenv.sh
  • update Makefile to use build, build-web, build-native, setup, setup-engines, and setup-web
  • make run-web and run-web-worker fail fast when build-web fails

Runtime and resource loading:

  • resolve ShareDir and LibDir from executable-relative paths
  • load engines from dist/share/engines and native libs from dist/lib
  • remove spxrun runtime auto-download and require pre-provisioned engines
  • track runtime versions with pck_version in cmd/gox/template and cmd/spxrun/runner, and pck_release_tag in cmd/gox/template

Web export cleanup:

  • remove brotli-specific .br handling and -build=fast leftovers
  • remove isWasmCompressed leftovers and keep uncompressed wasm flow
  • improve error propagation in web export and worker merge paths

CI and release:

  • switch cache namespace from spx-godot-* to spx-assets-*
  • make deps cache and setup arch-aware via spx-arch and SPX_ARCH
  • package goenv with go/bin, go/share, and go/lib from dist
  • re-enable release runtime verification with explicit success marker checks

Documentation:

  • update README.md and docs/zh/dev/engine/cmd_make.md for the new dist-based workflow
  • refresh web-related docs under docs/zh/dev/engine/

This is a breaking change. Existing installations that depend on $GOPATH/bin must migrate to the dist/ layout.

@gemini-code-assist

This comment was marked as off-topic.

gemini-code-assist[bot]

This comment was marked as off-topic.

@aofei aofei force-pushed the release branch 8 times, most recently from 0f04702 to 26a9a5c Compare February 9, 2026 14:12
@aofei aofei changed the title refactor: migrate build output from GOPATH to project-local dist directory refactor: migrate build and runtime assets to project-local Mar 5, 2026
@aofei aofei changed the title refactor: migrate build and runtime assets to project-local refactor: migrate build and runtime assets to project-local dist Mar 5, 2026
@aofei aofei force-pushed the release branch 4 times, most recently from 608fe01 to b64b6d5 Compare March 5, 2026 11:51
Restructure build and release workflows so SPX artifacts are produced
and consumed from `dist/` instead of `$GOPATH/bin`. This makes local
builds and packaged goenv releases use the same layout.

Build and packaging:
- add `scripts/build.sh`, `scripts/setup-engines.sh`,
  `scripts/setup-web-template.sh`, and `scripts/verify-goenv.sh`
- update `Makefile` to use `build`, `build-web`, `build-native`,
  `setup`, `setup-engines`, and `setup-web`
- make `run-web` and `run-web-worker` fail fast when `build-web` fails

Runtime and resource loading:
- resolve `ShareDir` and `LibDir` from executable-relative paths
- load engines from `dist/share/engines` and native libs from `dist/lib`
- remove `spxrun` runtime auto-download and require pre-provisioned engines
- track runtime versions with `pck_version` in `cmd/gox/template` and
  `cmd/spxrun/runner`, and `pck_release_tag` in `cmd/gox/template`

Web export cleanup:
- remove brotli-specific `.br` handling and `-build=fast` leftovers
- remove `isWasmCompressed` leftovers and keep uncompressed wasm flow
- improve error propagation in web export and worker merge paths

CI and release:
- switch cache namespace from `spx-godot-*` to `spx-assets-*`
- make deps cache and setup arch-aware via `spx-arch` and `SPX_ARCH`
- package goenv with `go/bin`, `go/share`, and `go/lib` from `dist`
- re-enable release runtime verification with explicit success marker checks

Documentation:
- update `README.md` and `docs/zh/dev/engine/cmd_make.md` for the new
  `dist`-based workflow
- refresh web-related docs under `docs/zh/dev/engine/`

This is a breaking change. Existing installations that depend on
`$GOPATH/bin` must migrate to the `dist/` layout.

Signed-off-by: Aofei Sheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant