Projects & Sessions
Templates, session persistence, export/import, and project configuration in the playground.
Templates
The playground offers three project templates, matching ach init --template:
vm
A general-purpose program. This is the default template.
// src/main.ach
let name = "Achronyme"
print("Hello from " + name + "!")
circuit
A ZK circuit with inline proving.
// src/main.ach
let a = 6
let b = 7
let out = a * b
let proof = prove multiply(out: Public) {
assert_eq(a * b, out)
}
print("Proof generated!")
print("Verified: " + verify_proof(proof).to_string())
prove
A program using Poseidon hashing with a prove block.
// src/main.ach
let secret = 0p42
let expected = poseidon(secret, 0p0)
let proof = prove check(expected: Public) {
let h = poseidon(secret, 0p0)
assert_eq(h, expected)
}
print("Proof: " + proof.to_string())
print("Valid: " + verify_proof(proof).to_string())
Select a template from the dropdown in the sidebar footer. Switching templates creates a fresh project.
Project configuration
Every project includes an achronyme.toml file:
[project]
name = "my-project"
entry = "src/main.ach"
[build]
backend = "r1cs"
The playground reads this file to determine:
- entry — which file to compile and run (default:
src/main.ach) - backend — proving backend:
r1cs(Groth16) orplonkish(Halo2)
See Project Configuration for all available options.
Session persistence
Your work persists across page reloads and browser restarts.
Auto-backup: every 3 seconds, all project files are backed up to localStorage. If the server loses your session (after a restart or TTL expiration), the playground automatically restores from this backup.
Session restore flow:
- Try to reconnect to the existing server session
- If the server lost it, create a new session and restore files from the localStorage backup
- If no backup exists, load the default
vmtemplate
Layout preferences (sidebar width, panel position, panel visibility) are also persisted in localStorage.
Export & Import
Export
Click Export in the sidebar footer to download your project as a project.ach.json file. This includes all files and their contents.
Import
Click Import to load a previously exported project. The playground creates a fresh session and writes all files from the JSON.
The export format is simple JSON:
{
"files": {
"achronyme.toml": "[project]\nname = \"demo\"\nentry = \"src/main.ach\"\n",
"src/main.ach": "print(\"Hello!\")\n"
},
"exportedAt": "2026-03-29T12:00:00.000Z"
}
Limits
| Resource | Limit |
|---|---|
| Files per project | 20 |
| File size | 32 KB |
| Total workspace | 256 KB |
| Allowed extensions | .ach, achronyme.toml |
| Session TTL | 2 hours (inactive) |
| Max concurrent sessions | 200 |
| Instruction budget | 100M instructions |
| Heap size | 256 MB |
| Execution timeout | 10 seconds |
| Print output | 1 MB |