Skip to content

Genetic code demo box

Runtime: node — the interpreter inside this box is Node 26, not Python.


The other demos prove a box starts. This one proves a box can carry data and be trusted to answer from it.

It ships the standard genetic code — NCBI translation table 1 — and the tool that queries it. The recipient needs neither Node, nor npm, nor a database: the box carries its own interpreter, its own data, and the code that joins them.

text
$ scrollcase run box/*.release.json -- Leucine

Leucine (Leu, L)
  UUA  UUG  CUU  CUC  CUA  CUG

Two constraints this demo documents by example

A node box cannot declare an npm dependency — Scrollcase solves from conda-forge and nothing else. The tool uses node:sqlite, which is part of Node itself, and the JavaScript enters through localFiles. And it pins Node 26, because node:sqlite needs a recent Node to work without a flag.

Try the demo

Build it yourself

The demo repository is almost empty on purpose: you package the data and the tool yourself, and its README is the walkthrough. Install the CLI, initialise the workspace, create the scroll, declare the files, lock, commit, sign and build.

Open in GitHub Codespaces

Builds the Linux x86_64 CPU box using your GitHub Codespaces account.

What it answers

CommandAnswer
run with no argumentswhat the box carries
run -- ATGthe amino acid that codon encodes
run -- Leucineevery codon for that amino acid
run -- ZZZnothing, and exit status 1

RNA is accepted alongside DNA, so UUG and TTG give the same answer.

Why the data is pinned

codons.csv is declared in the scroll with its SHA-256. Appending one fabricated row fails the build — Local box file SHA-256 mismatch — before anything is packed or signed. That is the point of a box that answers questions: the data it answers from is fixed at the moment it was signed.

The two native demos are the other half of this story

transcode-demo and dataset-demo carry no interpreter at all.

Scrollcase v1.0.0 · schema version 3 · Privacy · Changelog