Project-specific instructions for Claude Code.
rustledger.github.io is the website and WASM playground for rustledger. It uses:
- Vite for building
- Tailwind CSS for styling
- CodeMirror for the editor
@rustledger/wasmnpm package for the WASM runtime
- CI uses bun, not npm. The
bun.lockfile controls dependency versions. package-lock.jsonis for local npm usage but CI ignores it.- Workflow:
.github/workflows/deploy.yml - Deploy triggers: push to main,
wasm-releasedispatch,docs-updatedispatch, manual
The /docs/ path is served by VitePress. Docs content comes from the main rustledger repo.
- Source of truth:
rustledger/rustledger/docs/ - VitePress config:
docs/.vitepress/config.js(maintained here) - Auto-rebuild: When
docs/**changes in rustledger repo, it triggers adocs-updatedispatch
- Push to
rustledger/docs/**triggers.github/workflows/docs-update.yml - That workflow dispatches
docs-updateevent to this repo - This repo's deploy workflow fetches latest docs and rebuilds
npm run docs:dev # VitePress dev server
npm run docs:build # Build docs
npm run docs:preview # Preview built docsWhen updating dependencies, remember that CI uses bun.lock. If you update with npm locally, the bun.lock won't change and CI will use old versions. Either:
- Use
bun update <package>to update - Delete
bun.lockto force regeneration in CI
The @rustledger/wasm package version in bun.lock determines what the website uses. The status bar shows the version from wasm.version(). If it's stale, check bun.lock.
The account tree caches results to handle validation errors gracefully. When the ledger has errors, the tree shows the last successful data instead of "No accounts found".
npm run dev # Local dev server on port 8080
npm run build # Production build
npm run test # Run tests
npm run format # Format with prettier
npm run lint # ESLintindex.html- Main landing pagesrc/main.js- Playground initializationsrc/account-tree.js- Account tree sidebarsrc/wasm.js- WASM loading and APIpkg/- WASM files copied from node_modules at build time