Quickstart
This guide will get you from zero to running your first concurrent JavaScript program on the BEAM in under 5 minutes.Prerequisites
Before you begin, make sure you have:- Erlang/OTP 26+ - Arc runs on the BEAM VM
- Gleam 1.0+ - Arc is written in Gleam
- Git - To clone the repository
Run your first program
Build Arc
Arc uses Gleam’s build system:This compiles Arc to BEAM bytecode. The first build may take a minute as it downloads dependencies.
Run a sample program
Arc includes several example programs. Let’s start with the simplest one:You should see output showing two processes communicating:Each
<0.XXX.0> is a BEAM process ID (PID). You’ve just run concurrent JavaScript on the BEAM!Example programs
Arc includes several examples demonstrating different concurrency patterns. All examples are in theexamples/ directory.
Simple message passing
The most basic example shows parent-child communication:simple.js
Counter actor
A stateful process that responds to messages - the classic actor pattern:counter_actor.js
Concurrent processes
Multiple processes running in parallel on the BEAM scheduler:concurrent.js
Ping pong
Classic Erlang-style bidirectional message passing:ping_pong.js
Ring benchmark
Pass a message around N processes M times - a classic Erlang concurrency benchmark:ring.js
REPL commands
The Arc REPL includes several helpful commands:Process isolation demo
Arc processes are truly isolated - each spawned process gets a copy of the VM:mutability.js
Next steps
API reference
Learn about all Arc primitives and built-in APIs
Core concepts
Understand Arc’s design and architecture
Actor programming
Master concurrent programming patterns
Architecture
Understand how Arc works under the hood