Generate capabilities-secure Pony actor code with type safety and data-race freedom guaranteed at compile time.
simulation = ActorSimulation.new()
|> ActorSimulation.add_actor(:sender,
send_pattern: {:burst, 10, 1000, :batch},
targets: [:receiver])
|> ActorSimulation.add_actor(:receiver)
{:ok, files} = ActorSimulation.PonyGenerator.generate(simulation,
project_name: "my_actors",
enable_callbacks: true)
ActorSimulation.PonyGenerator.write_to_directory(files, "pony_out/")Pony is a capabilities-secure, actor-model language that provides:
✅ Type Safety - No null pointers, no buffer overruns
✅ Memory Safety - No dangling pointers, no memory leaks
✅ Data-Race Freedom - Guaranteed at compile time
✅ Deadlock Freedom - No locks, no deadlocks
✅ High Performance - Zero-cost abstractions
- Actor files (
*.pony) - Pony actor implementations - Callback traits (
*_callbacks.pony) - Trait definitions & implementations - Tests (
test/test.pony) - PonyTest test suite - Build files (
Makefile,corral.json) - Make + Corral - CI pipeline (
.github/workflows/ci.yml) - GitHub Actions
✅ Type-safe actor behaviors
✅ Callback traits (Notifier pattern)
✅ PonyTest automated tests
✅ Timer-based scheduling
✅ CI/CD pipeline included
See the complete generated project in the repository at examples/pony_pubsub/.
Try the single-file script: examples/single_file_pony.exs
# Install ponyup
curl --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.sh | sh
# Install pony compiler and corral
ponyup update ponyc release
ponyup update corral releasecd pony_output/
# Build
make build
# Run
./my_actors
# Test
make test