CellScript - A DSL for Cell-Based Contracts

CellScript 0.12: from syntax prototype to gated CKB tooling release

CellScript 0.12 is ready.

This release moves CellScript from a prototype-oriented DSL into an early compiler and tooling foundation for CKB-style contracts.

The short version:

0.12 proves that the bundled examples can compile, package, emit metadata, and pass strict local CKB acceptance gates under a clear release boundary.

It does not mean arbitrary new contracts are automatically production-ready.

It means the current bundled suite, compiler metadata, transaction builders, documentation, and acceptance evidence now agree on one tested boundary.

What is covered

0.12 closes the current bundled CKB example suite:

Example Actions Locks Status
amm_pool.cell 6 0 covered
launch.cell 2 0 covered
multisig.cell 8 5 covered
nft.cell 9 5 covered
timelock.cell 10 5 covered
token.cell 4 0 covered
vesting.cell 4 0 covered
Total 43 15 strict local CKB acceptance

The production gate strict-compiles the original sources under the CKB profile, deploys the bundled artifacts, and exercises every bundled business action through builder-backed local CKB transactions.

This is the main boundary of the 0.12 claim:

The bundled suite is production-gated. External contracts still need their own review, metadata checks, builder evidence, CKB acceptance reports, and security audit.

What changed

0.12 stabilises the practical toolchain around the language.

It includes:

  • .cell modules with typed declarations;
  • persistent Cell-native declarations: resource, shared, and receipt;
  • executable action and lock entries;
  • Cell effects such as consume, create, read_ref, transfer, destroy, claim, and settle;
  • RISC-V assembly and ELF output for ckb-vm-compatible execution;
  • explicit CKB target profile checks;
  • fail-closed handling for unsupported runtime assumptions;
  • entry-scoped compilation through --entry-action and --entry-lock;
  • artifact metadata sidecars;
  • cellc verify-artifact;
  • refreshed Wiki and tutorials;
  • a packaged VS Code extension with CellScript LSP support.

0.12 is deliberately precise about its supported type boundary.

Supported and documented:

  • Vec<u8>;
  • Vec<Address>;
  • Vec<Hash>;
  • documented fixed-width struct-vector paths.

Not claimed:

  • generic HashMap<K, V> runtime support;
  • complete linear ownership for arbitrary cell-backed collections;
  • automatic production readiness for external contracts.

Release evidence is now part of the workflow

A CellScript artifact should not be treated as just an ELF file.

0.12 pairs artifacts with metadata:

artifact
artifact.meta.json

The metadata exposes the compiler’s view of:

  • constraints;
  • runtime errors;
  • ABI shape;
  • CKB hash policy;
  • DepGroup policy;
  • capacity requirements;
  • transaction-size evidence;
  • cycle limits;
  • occupied-capacity evidence;
  • builder-facing assumptions.

cellc verify-artifact checks that an artifact matches its metadata sidecar and selected policy flags.

That is necessary for a production claim, but it is not sufficient by itself. A production claim also needs CKB acceptance evidence.

Useful commands

Run the production gate from the CellScript repository root:

./scripts/ckb_cellscript_acceptance.sh --production

Then validate the evidence:

python3 scripts/validate_ckb_cellscript_production_evidence.py \
  target/ckb-cellscript-acceptance/<run>/ckb-cellscript-acceptance-report.json

Several compiler-facing reports are now part of the normal review workflow:

Command Purpose
cellc metadata Emits artifact metadata and lowering/runtime details.
cellc constraints Exposes constraints, runtime errors, ABI, CKB policy, and capacity requirements.
cellc abi Explains externally callable entry ABI.
cellc entry-witness Encodes or explains parameterised entry witness payloads.
cellc scheduler-plan Reports admission and conflict policy from scheduler hints.
cellc opt-report Compares optimisation output and backend shape.
cellc ckb-hash Computes CKB Blake2b hashes for release and builder workflows.
cellc verify-artifact Verifies artifact, metadata, source hash, target profile, and production flags.

Package and editor workflow

0.12 also turns the local package workflow into something closer to a real developer toolchain.

Covered:

  • cellc init;
  • cellc build;
  • cellc check;
  • cellc fmt;
  • cellc doc;
  • cellc add --path;
  • cellc remove;
  • cellc info;
  • local path dependency checks;
  • lockfile consistency checks;
  • VS Code extension packaging;
  • CellScript LSP support.

Registry publishing and remote package resolution remain experimental and fail-closed.

What this proves

0.12 proves that the bundled production examples:

  • strict-compile under the CKB target profile;
  • produce ckb-vm-compatible artifacts;
  • emit metadata and constraints reports;
  • can be deployed in the local CKB production acceptance run;
  • have all bundled business actions exercised through builder-backed CKB transactions;
  • expose release evidence instead of leaving compiler and builder assumptions implicit.

In short:

0.12 makes CellScript reviewable as a toolchain, not only as a language idea.

What this does not claim

0.12 is still not an external security audit or a generic production certification system.

It does not claim:

  • arbitrary new contracts are production-ready;
  • external audit closure;
  • exhaustive state-space verification;
  • formal verification;
  • registry trust;
  • remote package trust;
  • public-network acceptance evidence;
  • generic map support;
  • full Cell-backed generic collection ownership.

External contracts still need their own:

  • metadata review;
  • builder evidence;
  • CKB acceptance reports;
  • malformed transaction tests;
  • capacity checks;
  • cycle and size analysis;
  • independent security review.
5 Likes