๐ค Contribute โ
Use this guide to set up a practical contributor workflow and validate both native and wasm paths early.
Tooling โ
Required โ
gcc-multilib: Required for cross-compilation.cargo-make: Used to build the project withcargo.nodejs: Needed to generate fonts for LVGL (lv_font_conv).wasm32-wasip1Rust target: Required to compile Xila virtual machine executables.wasm32-unknown-unknownRust target: Required for full contributor validation tasks (check-guest,doc-guest,clippy-guest,before-commit).
Optional (only if your task needs it) โ
- (Optional)
nightlyRust toolchain: Needed to compile thewasm_example. - (Optional)
trunk: Used to build thewasm_example. - (Optional) Rust xtensa-esp32*-espidf toolchain: For compiling for ESP32 / ESP32-S series.
- (Optional) Rust riscv*-esp-espidf: For compiling for ESP32-H / ESP32-C series.
First successful runs (native + wasm) โ
From a clean checkout:
bash
git clone https://github.com/Xila-Project/Core.git
cd CoreIf needed:
bash
cargo install cargo-make
rustup target add wasm32-wasip1Native run:
bash
cargo make run -p native_exampleWASM build signal:
bash
cargo build -p calculator --target wasm32-wasip1Expected success signals:
- Native example starts without immediate panic.
- WASM build completes and writes a
.wasmartifact.
Practical cargo-make workflow โ
Run these from Core root:
- Format while iterating:
cargo make format - Fast checks:
cargo make check - Lint before review:
cargo make clippy - Pre-commit gate:
cargo make before-commit
When working on docs/examples, also run only what your change touches to keep feedback fast.
Contribution checklist โ
- Reproduce the issue or define the expected behavior clearly.
- Make the smallest change that solves the problem.
- Run
cargo make format,cargo make check, andcargo make clippy. - Run both native and wasm validation for cross-target changes.
- Update docs/examples when behavior or APIs change.
Command reference โ
All commands below are run from the Core repository root using cargo make <task>.
Setup and assets โ
install-tools: Runnpm installfor tooling dependencies.generate-fonts: Generate LVGL fonts viafonts_generator.
Formatting โ
format-rust: Format all Rust code (cargo fmt --all).format-toml: Format TOML files withtaplo.format-json: Format JSON files withprettier.format: Run all formatting tasks (format-rust,format-toml,format-json).
Translations โ
translate-compare: Compare local translations with Tolgee.translate-sync: Sync translations and remove unused keys.translate-pull: Pull translations from Tolgee.translate-push: Push local translations to Tolgee.
Checks, docs, and linting โ
- Note on targets:
wasm32-wasip1is the runtime target used for wasm executables, while some workspace checks/examples still usewasm32-unknown-unknownfor web-facing paths. check-host: Runcargo checkfor host target (x86_64-unknown-linux-gnu) with host graphics features.check-guest: Runcargo checkfor guest target (wasm32-unknown-unknown) on packagewasmwithdefault_guest.check: Run both host and guest checks.doc-host: Build host documentation.doc-guest: Build guest documentation.doc: Build both host and guest documentation.clippy-host: Run clippy for host target and deny warnings.clippy-guest: Run clippy for guest target and deny warnings.clippy: Run both host and guest clippy checks.lint: Run clippy for all targets/features and deny warnings.
Build, run, test, coverage โ
test: Run workspace tests.run: Wrapper overcargo run(accepts forwarded args).build: Wrapper overcargo build(accepts forwarded args).coverage: Run coverage withcargo llvm-cov.
Workflow task โ
before-commit: Runformat,check,doc, andclippybefore committing.
Examples โ
cargo make formatcargo make checkcargo make run -p native_examplecargo make generate-fontscargo make before-commit
Troubleshooting โ
cargo makenot found: runcargo install cargo-makeand open a new shell.- WASM target missing: run
rustup target add wasm32-wasip1. - Font generation errors: verify
nodejsis installed, then reruncargo make generate-fonts. - Web example fails to serve: install optional
trunkand required wasm web target/toolchain.
Next steps โ
- Pick user-facing onboarding paths in Use on Host and Use on WASM.
- Use Modules architecture map and Executables architecture map to choose where your change should live.
- Review executable behavior pages: WASM, Command line shell, and Graphical shell.