๐Ÿ’ป GenServerVirtualTime

Code Generators

Export actor simulations to production-ready code in multiple languages and frameworks

๐ŸŽฏ Overview

GenServerVirtualTime can generate production-ready actor system implementations in multiple languages and frameworks. Design your system in Elixir using the high-level DSL, simulate it with virtual time, then export to your target platform with complete build configuration, tests, and CI/CD pipelines.

5
Languages
6
Frameworks
20
Live Examples

๐Ÿ› ๏ธ Available Generators

Generator Language Framework & Output Example Projects
CAF
C++ Actor Framework โ†’
C++
โ€ข Typed actors with callback interfaces
โ€ข CMake build system with Conan dependencies
โ€ข Catch2 test suite with GitHub Actions CI
โ€ข Separation: generated code + user callbacks
OMNeT++
Network Simulation Framework โ†’
C++
โ€ข Discrete-event simulation modules
โ€ข NED network topology files
โ€ข CMake build with omnetpp.ini config
โ€ข Industry-standard network simulation
Pony
Pony Language โ†’
Pony
โ€ข Capabilities-secure actors
โ€ข Data-race free by design
โ€ข Corral dependency management
โ€ข PonyTest suite with Makefile
Phony
Phony Actor Library โ†’
Go
โ€ข Zero-allocation actor system
โ€ข Pony-inspired Go library
โ€ข Go modules with go test
โ€ข High-performance message passing
Ractor
Ractor Actor Framework โ†’
Rust
โ€ข Gen_server-inspired actor model
โ€ข OTP-style supervision trees
โ€ข Cargo build with integration tests
โ€ข Type-safe async/await actors
VLINGO XOOM
VLINGO Platform โ†’
Java
โ€ข Type-safe protocol actors
โ€ข Scheduled message delivery
โ€ข Maven build with JUnit 5 tests
โ€ข Enterprise-ready actor platform

โœจ Features Included

โœ… Complete Build System

CMake, Maven, Go modules, or Corral - ready to build immediately

๐Ÿงช Test Suites

Comprehensive tests with Catch2, JUnit 5, PonyTest, Go testing, or Cargo

๐Ÿ”„ CI/CD Pipelines

GitHub Actions workflows for continuous integration

๐ŸŽฏ Callback Interfaces

Separation of generated code and user-defined behavior

๐Ÿ“ฆ Dependency Management

Conan, Maven, Corral, or Go modules with versions specified

๐Ÿ“š Documentation

README files with build instructions and usage examples

๐Ÿ—๏ธ Project Structure

Production-ready layout following framework conventions

โšก Fast Prototyping

Design in Elixir (10-100x faster), export to production

๐Ÿš€ Quick Start

Generate code from an actor simulation:

# Define your simulation
simulation = ActorSimulation.new()
|> ActorSimulation.add_actor(:publisher,
    send_pattern: {:periodic, 100, :event},
    targets: [:sub1, :sub2])
|> ActorSimulation.add_actor(:sub1)
|> ActorSimulation.add_actor(:sub2)

# Generate CAF (C++) code
{:ok, files} = ActorSimulation.CAFGenerator.generate(simulation,
  project_name: "PubSubActors",
  enable_callbacks: true)
ActorSimulation.CAFGenerator.write_to_directory(files, "output/")

# Or OMNeT++ for network simulation
{:ok, files} = ActorSimulation.OMNeTPPGenerator.generate(simulation,
  network_name: "PubSub",
  sim_time_limit: 10)

# Or Pony for capabilities-secure actors
{:ok, files} = ActorSimulation.PonyGenerator.generate(simulation,
  project_name: "pubsub",
  enable_callbacks: true)

# Or Go with Phony
{:ok, files} = ActorSimulation.PhonyGenerator.generate(simulation,
  project_name: "pubsub")

# Or Rust with Ractor  
{:ok, files} = ActorSimulation.RactorGenerator.generate(simulation,
  project_name: "pubsub",
  enable_callbacks: true)

# Or Java with VLINGO XOOM
{:ok, files} = ActorSimulation.VlingoGenerator.generate(simulation,
  project_name: "pubsub-actors",
  group_id: "com.example")

Then build and run in your target language:

# CAF (C++)
cd output/ && mkdir build && cd build
cmake .. && make && make test

# OMNeT++
cd output/ && mkdir build && cd build
cmake .. && make && ./PubSub -u Cmdenv

# Pony
cd output/ && make test

# Phony (Go)
cd output/ && go test ./...

# Ractor (Rust)
cd output/ && cargo test

# VLINGO (Java)
cd output/ && mvn test

๐Ÿ“– Learn More

๐Ÿ“š Documentation

Detailed guides for each generator:

โ†’ API Reference
โ†’ CAF Generator Guide
โ†’ OMNeT++ Generator Guide
โ†’ Pony Generator Guide
โ†’ Phony Generator Guide
โ†’ VLINGO Generator Guide

๐ŸŽ“ Examples

Explore working examples:

โ†’ All Example Projects
โ†’ CAF Demo Script
โ†’ OMNeT++ Demo Script
โ†’ CAF Single File Example
โ†’ OMNeT++ Single File Example
โ†’ Pony Single File Example
โ†’ Phony Single File Example
โ†’ Ractor Single File Example
โ†’ VLINGO Single File Example