Skip to content

build: run trunk and cargo from the workspace root, drop the Makefile - #8

Merged
suradet-ps merged 3 commits into
mainfrom
chore/root-trunk
Aug 7, 2026
Merged

build: run trunk and cargo from the workspace root, drop the Makefile#8
suradet-ps merged 3 commits into
mainfrom
chore/root-trunk

Conversation

@suradet-ps

Copy link
Copy Markdown
Owner

Run everything from the workspace root

Trunk used to live inside crates/app, forcing cd crates/app before every
serve/build (that's what the Makefile was compensating for). This PR mirrors
the codeframe layout so trunk serve / trunk build / all cargo commands
run from the root, and removes the Makefile.

Changes

  • Trunk assets moved to the root 0fb2749index.html, Trunk.toml,
    favicon.svg now sit at the workspace root (as AGENTS.md §7 always
    described). The rust pipeline is wired via
    <link data-trunk rel="rust" href="crates/app/Cargo.toml" data-bin="app"/>.
    Trunk.toml must exist at the root or Trunk auto-detects the virtual
    manifest and fails. style.css is still referenced from the crate
    (crates/app/src/style.css).
  • Deploy/CI build from root 1173c9c — vercel.json: trunk build --release, output dist; CI build job drops working-directory: crates/app. The Makefile is deleted.
  • Docs updated cc6ff69 — README, CONTRIBUTING, AGENTS.md no longer tell
    anyone to cd crates/app.

Verification

  • trunk build --release from the root — success, dist/ at the root
    (wasm + hashed css + favicon all emitted)
  • cargo test --workspace --exclude app — 48 passed
  • cargo check --workspace --target wasm32-unknown-unknown — clean
  • cargo fmt --all --check — clean

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.
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lepo Ready Ready Preview Aug 7, 2026 9:31am

@suradet-ps
suradet-ps merged commit e3d8794 into main Aug 7, 2026
8 checks passed
@suradet-ps
suradet-ps deleted the chore/root-trunk branch August 7, 2026 09:45
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