-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial 01 Getting Started
Tawan edited this page Apr 21, 2026
·
7 revisions
This page gets you from a fresh checkout to a compiled CellScript artifact.
- Rust toolchain with Cargo support for the repository MSRV.
- CellScript source checkout.
- No external RISC-V toolchain is required for the built-in assembler path.
git clone https://github.com/tsukifune-kosei/CellScript.git
cd CellScript
cargo test --lockedcargo build --locked --bin cellcYou can then invoke the compiler through Cargo:
cargo run --locked --bin cellc -- --helpOr through the built binary:
./target/debug/cellc --helpCompile the bundled token example to RISC-V assembly:
cargo run --locked --bin cellc -- examples/token.cell --target riscv64-asm --target-profile spora -o /tmp/token.sCompile the same source to ELF:
cargo run --locked --bin cellc -- examples/token.cell --target riscv64-elf --target-profile spora -o /tmp/token.elfCompilation writes a metadata sidecar next to the artifact:
/tmp/token.elf
/tmp/token.elf.meta.json
cargo run --locked --bin cellc -- verify-artifact /tmp/token.elf --expect-target-profile sporaUse source verification when you want the metadata sidecar to be checked against files on disk:
cargo run --locked --bin cellc -- verify-artifact /tmp/token.elf --verify-sources --expect-target-profile sporaThe CKB profile emits raw ELF bytes without the Spora ABI trailer and uses CKB syscall/profile rules.
cargo run --locked --bin cellc -- examples/token.cell --target riscv64-elf --target-profile ckb -o /tmp/token.ckb.elf
cargo run --locked --bin cellc -- verify-artifact /tmp/token.ckb.elf --expect-target-profile ckbIf a source uses a Spora-only feature or an unsupported CKB stateful shape, the CKB profile should fail closed with a target-profile policy error.
Continue with Language Basics.