Project Setup
[!WARNING] If you clone the project, Make sure to initialize the git submodules.
You can either add the
--recurse-submodulesflag when doinggit cloneor dogit submodule update --init --recursiveonce it is already cloned.
This project uses Bun (for Web) and Deno (for CLI).
[!IMPORTANT] Building the assembler dependency requires installing rustup, Deno, and wasm-pack.
bun install # install dependencies
bun dev:wasm # build wasm dependencies
bun build:gateway # bundle gateway driver (optional)
Compile Web and Hot-Reload for Development (with Vite)
bun dev:web
Run CLI and Hot-Reload for Development (with Deno)
bun dev:cli
[!NOTE] Remember to pass the extra arguments, e.g:
bun dev:cli -a ./architecture/RISCV/RV32IMFD.yml -I -c creatorconfig.yml
Building Web version for production
bun build:web
The resulting bundle will be saved to dist/web/.
[!TIP] To test locally the bundle version, as it will be deployed in GitHub Pages:
REPO="creatorV" bun build:web cd dist/web python -m http.server 8080And go to localhost:8080/creatorV/
Building CLI version
bun build:cli
Lint with ESLint
bun lint
Format with Prettier
bun format <file/directory>
Run Tests
Unit tests (with Deno)
deno test -A --unstable-node-globals --parallel
VS Code Setup
The recommended extensions are:
[!NOTE] The recommended formatter to use with Vue files is Prettier (
esbenp.prettier-vscode):"[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
Debugging
We provide some example launch configurations:
Web
We'll need to launch the application in DEV mode, and then attach the VS Code debugger to the Chrome instance.
{
"type": "chrome",
"request": "launch",
"name": "Debug Web",
"url": "http://localhost:5173",
"webRoot": "${workspaceFolder}"
}
CLI
{
"type": "node",
"request": "launch",
"name": "Debug CLI",
"program": "${workspaceFolder}/src/cli/creator6.mts",
"runtimeExecutable": "deno",
"console": "integratedTerminal",
"runtimeArgs": ["-A", "--unstable-node-globals", "--inspect-brk"],
"experimentalNetworking": "off",
"args": [
"-a",
"./architecture/RISCV/RV32IMFD.yml",
"-s",
"./tests/arch/riscv/correct/examples/test_riscv_example_011.s",
"-c",
"creatorconfig.yml",
"-I"
],
"attachSimplePort": 9229
}