Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

100 Commits

Sponsor

What Is This?

Chapeliser is a general-purpose Chapel acceleration framework that lets developers scale single-machine applications to distributed clusters without learning Chapel.

You describe your workload in a manifest (chapeliser.toml), point Chapeliser at your code, and it generates the distributed scaffolding — Chapel coforall loops, data partitioning, result gathering, and the ABI/FFI bridge between your application and the Chapel runtime.

The Problem

Chapel is one of the most powerful parallel programming languages ever built. It can distribute computation across thousands of nodes with elegant syntax. But almost nobody uses it because:

  1. Steep learning curve — you must rewrite your application in Chapel or deeply understand its interop model

  2. No incremental adoption path — it’s all-or-nothing

  3. Build system complexity — integrating Chapel with existing Rust/C/Zig projects is non-trivial

Chapeliser solves all three.

How It Works

Your application (Rust, C, Zig)
│
▼
chapeliser.toml ──► Chapeliser CLI
│ │
│ ┌───────────┴───────────┐
│ │ │
▼ ▼ ▼
Idris2 ABI Zig FFI Chapel wrapper
(formal proof of (C-ABI bridge (coforall + data
data layout + to Chapel distribution +
partition safety) runtime) gather/reduce)
│ │ │
└────────┬───────┘ │
▼ │
generated/abi/*.h ◄───────────────────┘
│
▼
Your app, now distributed

The Manifest

[workload]
name = "my-scanner"entry = "src/batch.rs::scan_all"# function to distributepartition = "per-item"# split strategygather = "merge"# combine strategy
[data]
input-type = "Vec<PathBuf>"# what gets distributedoutput-type = "Vec<ScanResult>"# what comes backserialization = "bincode"# wire format
[scaling]
min-nodes = 1# runs locally if alonemax-nodes = 256# scales to clustergrain-size = 50# items per Chapel task

You write zero Chapel code. Chapeliser generates everything.

Partition Strategies

StrategyDescriptionBest For
per-itemOne item per taskFile scanning, image processing
chunkFixed-size chunksData pipelines, ETL
adaptiveDynamic load balancingHeterogeneous workloads
spatialDomain decompositionSimulation, matrices
keyedGroup by keyMap-reduce, aggregation

Gather Strategies

StrategyDescription
mergeConcatenate all results
reduceApply reduction function (sum, max, min, custom)
tree-reduceLogarithmic reduction for associative ops
streamResults stream back as they complete
firstReturn first successful result (search)

Architecture

Chapeliser follows the hyperpolymath ABI-FFI standard:

  • Idris2 ABI (src/interface/abi/) — Dependent-type proof obligations, machine-checked in CI (.github/workflows/provable.yml); the Rust mirror in src/abi/ carries the matching runtime types and checks:

    • Partition functions produce complete, non-overlapping splits

    • Gather functions preserve all results

    • Serialization round-trips are identity

    • Memory layouts are consistent across the FFI boundary

  • Zig FFI (src/interface/ffi/) — C-ABI bridge between:

    • The user’s application (any language with C FFI)

    • The Chapel runtime (chpl_* functions)

    • Memory management across the boundary

  • Chapel codegen (src/codegen/) — Generates:

    • coforall distribution loops

    • Locale-aware data placement

    • Communication primitives (GET/PUT/AMO)

    • Fault tolerance (retry, checkpoint, redistribute)

  • Rust CLI (src/) — The chapeliser command:

    • Parses chapeliser.toml

    • Validates workload description

    • Generates Chapel + Zig + C header scaffolding

    • Builds and links everything

    • Provides chapeliserrun for execution

Quick Start

# Install (once published to crates.io — see ROADMAP Phase 3)
cargo install chapeliser
# In your project directory, create chapeliser.toml (see above)
chapeliser init # generates scaffold from manifest
chapeliser build # compiles Chapel wrapper + FFI bridge
chapeliser run # executes locally (1 node)
chapeliser run -n 8 # distributes across 8 nodes
chapeliser run --cluster my-cluster.toml # full cluster

First Consumer: panic-attacker

The first application to be Chapelised is panic-attacker’s mass-panic (assemblyline) mode — distributing static analysis across hundreds of repositories on a compute cluster.

Status

Pre-alpha. The Rust CLI and code generator are implemented and tested (63 tests). The Idris2 proofs, Zig FFI, and a golden Chapel compile-and-run are wired into CI as the verification gate (.github/workflows/provable.yml) — see ROADMAP.adoc Phase 1b for their live (green/red) status. Not yet released.

License

SPDX-License-Identifier: CC-BY-SA-4.0

About

General-purpose Chapel acceleration framework — distribute any workload without learning Chapel

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages