Ponyiser wraps existing concurrent code in Pony’s reference capability system — making data races structurally impossible at compile time.
Pony (by Sylvan Clebsch et al.) uses a capability-secure type system with six reference capabilities that guarantee zero data races without locks, mutexes, or garbage collection pauses. Ponyiser brings these guarantees to existing codebases through manifest-driven code generation.
Pony’s type system assigns every reference one of six capabilities:
| Capability | Alias | Meaning |
|---|---|---|
|
Isolated |
Only one reference exists. The holder has exclusive read/write access. Sendable across actors — ownership transfers on send. |
|
Immutable |
Globally immutable. Any number of actors can hold |
|
Mutable |
Mutable, but not sendable. Confined to the actor that created it. Multiple aliases within the same actor are fine. |
|
Read-only |
Read access only. May be an alias of a |
|
Transitional |
Write access, but existing aliases are read-only ( |
|
Identity-only |
No read, no write. Used to hold a reference for identity comparison or to send actor addresses. Always sendable. |
These six capabilities form a subtyping lattice: iso is the most restrictive (and most powerful), tag is the least. Pony’s compiler statically verifies that every reference obeys its capability at every use site.
Describe your concurrent components in ponyiser.toml. Ponyiser then:
-
Analyses shared state, message-passing patterns, and data flow between concurrent components
-
Assigns the most permissive safe Pony reference capability to each data reference (iso for exclusive ownership, val for shared immutable, ref for actor-local mutable, etc.)
-
Generates Pony actors with correctly annotated behaviours (asynchronous message handlers) and capability-safe field declarations
-
Creates a Zig FFI bridge for interop with your existing code, with C-ABI-compatible types
-
Verifies via the Idris2 ABI layer that the generated capability assignments satisfy Pony’s subtyping rules — any violation becomes a compile-time error
The result is lock-free, data-race-free concurrent code backed by formal proofs.
Ponyiser generates code that follows Pony’s actor model:
-
Actors — lightweight concurrent entities, each with a private heap. No shared mutable state between actors.
-
Behaviours — asynchronous message handlers on actors. Behaviours execute atomically within an actor (no interleaving).
-
Causal messaging — messages between actors are delivered in causal order. If actor A sends message M1 before M2 to actor B, B processes M1 first.
-
Capability-safe fields — every field in an actor carries a reference capability. The compiler prevents you from storing a
refin a sendable message or sharing anisowithout consuming it.
-
Concurrent server code — wrap request handlers in actors with
isorequest objects andvalshared config -
Actor-based architectures — model existing producer/consumer or pipeline patterns as Pony actors with capability-safe channels
-
Real-time systems — Pony’s GC is per-actor and never stops the world; generated code inherits this property
-
Message-passing pipelines — chain actors where each stage receives
isoownership of data, transforms it, and passes it on
Follows the hyperpolymath -iser pattern (same as Chapeliser):
-
Manifest (
ponyiser.toml) — describe WHAT concurrent components you have, their shared state, and message patterns -
Idris2 ABI (
src/interface/abi/) — formal proofs of capability subtyping correctness and actor mailbox layout -
Zig FFI (
src/interface/ffi/) — C-ABI bridge between generated Pony code and existing codebase -
Codegen (
src/codegen/) — generates Pony actors, behaviours, and capability annotations -
Rust CLI — parses manifest, validates capability assignments, generates, builds, runs
User writes zero Pony code. Ponyiser generates everything.
Part of the -iser family of acceleration frameworks.
# Initialise a manifest in the current directory
ponyiser init
# Edit ponyiser.toml to describe your concurrent components
# Validate the manifest
ponyiser validate
# Generate Pony actors and FFI bridge
ponyiser generate
# Build and run
ponyiser build --release
ponyiser runPre-alpha. Architecture defined, CLI scaffolded, ABI types for reference capabilities designed. Codegen pending.