build: run trunk and cargo from the workspace root, drop the Makefile - #8
Merged
Conversation
Trunk previously lived inside crates/app, forcing `cd crates/app` for every serve/build. Following the codeframe layout, index.html, Trunk.toml and favicon.svg now sit at the root and the rust pipeline is wired via `<link data-trunk rel="rust" href="crates/app/Cargo.toml" data-bin="app"/>`, so `trunk serve` / `trunk build` run from the root. Trunk.toml must exist at the root or Trunk would treat the virtual manifest as its source and fail. The stale crates/app/dist output was removed.
vercel.json ran cd crates/app && trunk build --release with crates/app/dist as the output; CI's build job used working-directory crates/app. With Trunk assets at the root both now run trunk build --release and output dist directly. The Makefile, which existed only to compensate for Trunk being stuck in crates/app, is removed.
README, CONTRIBUTING and AGENTS.md still told contributors to cd into crates/app for trunk serve/build. All commands now run from the root: trunk serve --port 3000 --open, trunk build --release, with dist/ noted as the output.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run everything from the workspace root
Trunk used to live inside
crates/app, forcingcd crates/appbefore everyserve/build (that's what the Makefile was compensating for). This PR mirrors
the codeframe layout so
trunk serve/trunk build/ all cargo commandsrun from the root, and removes the Makefile.
Changes
0fb2749—index.html,Trunk.toml,favicon.svgnow sit at the workspace root (as AGENTS.md §7 alwaysdescribed). The rust pipeline is wired via
<link data-trunk rel="rust" href="crates/app/Cargo.toml" data-bin="app"/>.Trunk.tomlmust exist at the root or Trunk auto-detects the virtualmanifest and fails.
style.cssis still referenced from the crate(
crates/app/src/style.css).1173c9c— vercel.json:trunk build --release, outputdist; CI build job dropsworking-directory: crates/app. The Makefile is deleted.cc6ff69— README, CONTRIBUTING, AGENTS.md no longer tellanyone to
cd crates/app.Verification
trunk build --releasefrom the root — success,dist/at the root(wasm + hashed css + favicon all emitted)
cargo test --workspace --exclude app— 48 passedcargo check --workspace --target wasm32-unknown-unknown— cleancargo fmt --all --check— clean