A simple, yet rock solid, functional language with an imperative bias, targeting UPLC
Pebble is a smart-contract language for Cardano with TypeScript-shaped
syntax — const, if, C-style for loops, structs, generics, modules —
compiled to Untyped Plutus Core (UPLC) by a whole-program optimizing
compiler. You write imperative-looking code; the compiler lowers loops to
tail recursion, places every computation exactly once, and emits compact
scripts that use the newest on-chain features (UPLC 1.2 case/constr,
the protocol-version-11 builtins).
What you get out of the box:
- a type system built for validators: data-encoded and
sum-of-products structs, generics with monomorphization, exhaustive
match, flow-sensitive narrowing, and the full script-context prelude (ScriptContext,Tx,Value,Interval, …); - a standard library covering the common dApp patterns —
tx.signedBy,tx.findInput,tx.valuePaidTo,Valuearithmetic, interval helpers, lists and linear maps; - a built-in test framework:
pebble testruns unit and property tests on the real CEK machine, with typed fuzzers for every parameter type, user-definedviafuzzers, failing-input shrinking, and per-test cpu/mem budgets; - competitive output: Pebble holds the lowest CPU numbers in the
UPLC-CAPE
two_party_escrowreal-world benchmark and thefactorialopen benchmark (where it leads memory too) — see BENCHMARKS.md and the live report.
Pebble is benchmarked against Aiken, Plinth, Plutarch, Scalus and OpShin in IntersectMBO's UPLC-CAPE suite: results and methodology in BENCHMARKS.md, rendered charts on the live report.
command line
npm install -g @harmoniclabs/pebbleor as library (in your project root dir)
npm install @harmoniclabs/pebbleHave a look at the pebble documentation where you can find some example projects to help you get started.
the sponsors.md file contains a list of supporters of this project.
Every one of them is special and is contributing to making this software available for everyone.
a collection of all proposals made in the past is in the catalyst-proposals.md file
