Warning
Make sure to initialize the git submodules.
You can either add the --recurse-submodules flag when doing git clone or
do git submodule update --init --recursive once it is already cloned.
This project uses Bun (for Web) and Deno (for CLI).
bun install # install dependencies
bun dev:wasm # build wasm dependenciesCompile Web and Hot-Reload for Development (with Vite)
bun dev:webRun CLI and Hot-Reload for Development (with Deno)
bun dev:cliNote
Remember to pass the extra arguments, e.g:
bun dev:cli -a ./architecture/RISCV/RV32IMFD.yml -I -c creatorconfig.ymlbun build:webThe resulting bundle will be saved to dist/web/.
Tip
To test locally the bundle version, as it will be deployed in GitHub Pages:
REPO="creator" bun build:web
cd dist/web
python -m http.server 8080And go to localhost:8080/creator/
bun build:cliLint with ESLint
bun lintFormat with Prettier
bun format <file/directory>Unit tests (with Deno)
deno test -A --unstable-node-globals --parallelIntegration tests use Deno's snapshot testing. They store the last known good result, and compare new results against the stored snapshots to verify them (showing the differences if they don't match). For this reason, the snapshots should always be committed to the repo. They are run along with the other tests using the command above. The snapshots can be created/updated automatically with:
deno test -A --unstable-node-globals --parallel -- --updateThis project includes a JSON RPC server that exposes the CREATOR emulator's core functionalities.
For more details, see the RPC Server README.
The recommended extensions are:
Note
The recommended formatter to use with Vue files is Prettier (esbenp.prettier-vscode):
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},We provide some example launch configurations:
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}"
}{
"type": "node",
"request": "launch",
"name": "Debug CLI",
"program": "${workspaceFolder}/src/cli/creator-cli.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
}- MDN Web Docs
- The TypeScript Handbook
- D. Camarmas et al. - CREATOR: Simulador didáctico y genérico para la programación en ensamblador
- D. Camarmas - Diseño y desarrollo de un simulador genérico para programación en ensamblador