The substrate Solana programs grow on.
A systems-oriented Solana program framework in Zig. Visibility over convenience. Comptime over runtime.
Quickstart · Architecture · Benchmarks · CLI · Examples
Programs are written against a ~1900-line comptime substrate that knows the SBPFv3 ABI and stays out of the way at runtime. No proc macros, no derive expansions, no hidden validation. The generated SBPF is byte-identical to what you would have written by hand.
- 2–5× fewer CU than Anchor 1.0, 9× smaller on chain
- A complete PDA vault — state, three instructions, every edge case — is 62 lines of Zig
mycelium init demoscaffolds a standalone project like Anchor
curl -fsSL https://raw.githubusercontent.com/srivtx/mycelium/main/install.sh | bash
mycelium init demo && cd demo && mycelium buildFull setup (LLVM symlinks, validator, etc.) in QUICKSTART.md.
const mycelium = @import("mycelium");
const accs = mycelium.accounts;
const fw = mycelium.framework;
fn initialize(ctx: mycelium.Ctx, p: *const Init) !void {
const a = try accs.unpack(ctx, .{ .authority = accs.sw, .vault = accs.w, .sys = accs.sys });
const s = try fw.createPdaState(State, .{
.payer = a.authority, .pda = a.vault, .system_program = a.sys,
.program_id = ctx.program_id,
.seeds = &.{ SEED, &a.authority.key().bytes },
.bump = p.bump, .rent_lamports = p.rent,
});
s.authority = a.authority.key().*;
s.bump = p.bump;
s.initialized = 1;
}See the full vault → 62 lines. For the manual-vs-recipe-layer comparison, see EXAMPLES.md.
Same vault, four implementations, on Agave 3.1:
| Anchor | mycelium v3 | Anchor / mycelium | |
|---|---|---|---|
| initialize | 9 497 | 3 949 | 2.40× |
| deposit | 5 504 | 2 034 | 2.71× |
| withdraw | 4 053 | 766 | 5.29× |
| binary size | 153 KB | 17 KB | 9.2× |
Full 4-way table (Anchor / v1 / v2 / v3) and escrow numbers in BENCHMARKS.md.
Working end-to-end on a local validator with PDA + CPI, a vault, an
escrow, and a mycelium CLI. Ten example programs build and execute;
43 host-side tests pass. Research-grade — do not deploy to mainnet
without an audit.