Skip to content
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

Make server → wasm dependency optional #270

Open
kpreid opened this issue Jul 23, 2022 · 1 comment
Open

Make server → wasm dependency optional #270

kpreid opened this issue Jul 23, 2022 · 1 comment
Assignees
Labels
area: build kind: feature Adding user-facing/developer-facing functionality

Comments

@kpreid
Copy link
Owner

kpreid commented Jul 23, 2022

It should be possible to build the workspace without necessarily running the wasm build. Use cases:

  • Build without requiring npm and wasm-pack tools.
    • People may wish to build and play or contribute to all-is-cubes without caring about the web target.
    • I haven't figured out how to get npm to work on Windows on a GitHub Actions runner; right now the CI steps have a special case for this.
  • Publish the all-is-cubes-server library without embedding a wasm binary; have it optionally supplied at run-time, or left out entirely, instead. This way we don't have large rarely-useful build artifacts in what we publish to crates.io.
@kpreid kpreid added the kind: feature Adding user-facing/developer-facing functionality label Jul 23, 2022
@kpreid kpreid self-assigned this Jul 23, 2022
@kpreid
Copy link
Owner Author

kpreid commented Oct 5, 2023

Status update:

  • Webpack is no longer used at all.
  • The server can be built without the -wasm dependency.

However, xtask still builds -wasm for all whole-project operations. I am still thinking about how to make this unnecessary.

One possibility is that by splitting into multiple workspaces along some line, all-is-cubes-server could invoke the -wasm build from inside its own build script, thus ensuring that it's available just in time only if needed. The two possible splits are -wasm in its own workspace or -server in its own workspace. Of these two, -wasm is clearly preferable because it also solves problems with target-specific dependencies not compiling elsewhere, but the last time I tried that I got a mysterious run time memory corruption error. So, I want to solve that to be able to solve this properly. #410 tracks that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build kind: feature Adding user-facing/developer-facing functionality
Projects
None yet
Development

No branches or pull requests

1 participant