Aiken
Aiken is a new programming language and toolkit for developing smart contracts on the Cardano blockchain.
Aiken draws inspiration from many modern languages such as Gleam, Rust, and Elm, known for its friendly error messages and overall great developer experience. We believe Cardano deserves a dedicated language with these kinds of features, developed openly with the community
A pure functional programming language
- Small and easy to learn
- Strong static typing with inference
- First-class functions, everything is an expression
- Custom types, recursion, modules, generics...
- Modules, imports and package manager
validator hello_world {
fn(datum, redeemer, context) -> Bool {
let must_say_hello =
redeemer == "Hello, World!"
let must_be_signed =
list.has(
context.transaction.extra_signatories,
datum.owner,
)
must_say_hello? && must_be_signed?
}
}
A modern development environment
- Zero configuration, one single capable tool
- Quick and friendly feedback with helpful error diagnotics
- Language-Server Protocol (LSP) with auto-formatting
- Easy-to-produce and beautiful libraries documentation
- Editors integration (VSCode + NeoVim)
Error: err::aiken::check::unknown_record_field
× While trying to make sense of your code...
╰─▶ I looked for the field 'extra_signatures' in a record
of type 'Transaction' but didn't find it.
╭─[examples/hello_world/validators/hello_world.ak:18:1]
18 │ let must_be_signed =
19 │ list.has(
20 │ context.transaction.extra_signatures,
· ────────────────────────────────────
21 │ datum.owner
22 │ )
╰─────────────────────────────────────────────────────
help: Did you mean 'extra_signatories'?
A toolkit for working with Plutus
- Baked-in unit test framework
- Optimized for on-chain execution
- Full-blown Plutus interpreter & disassembler
- Execution cost evaluation with trace reporting
- Low-level scripts arguments injection
Compiling aiken-lang/stdlib 0.0.0
Testing ...
┍━ aiken/option ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
│ PASS [mem: 5099, cpu: 1884852] or_else_1
│ PASS [mem: 5963, cpu: 3091855] map_1
│ PASS [mem: 11985, cpu: 5076974] map_2
│ PASS [mem: 6863, cpu: 3298855] and_then_1
│ PASS [mem: 14187, cpu: 5872937] and_then_2
│ PASS [mem: 11657, cpu: 4918544] and_then_3
┕━━━━━━━━━━━━━━ 13 tests | 13 passed | 0 failed
Summary 0 error, 0 warning(s)
A truly open source ecosystem
- Written in Rust, licensed under Apache-2.0
- Open contribution process with clear guidelines
- 20+ contributors from the Cardano community
- Fully documented with end-to-end examples
- Initiated by TxPipe, Nurtured by the Cardano Foundation
Roadmap
Q3 2022
- Binary flat encoding/encoding
- Untyped Plutus Core (UPLC) parsing
- UPLC pretty-printing
- Native Plutus core interpreter
- Cost and evaluation of Plutus programs
- Aiken's language Proof-of-concept
Q4 2022
- Aiken's Lexer/Parser with highlight
- Type checking with beautiful errors
- LSP, code formatting, editors integrations
- Standard library, user manual & basic tooling
- Modules & package management
- Unit test framework
Q1 2023
- Compiler fine-tuning & optimizations
- End-to-end examples on Cardano's preview network
- Interoperable smart-contract blueprints (CIP-0057(opens in a new tab))
- LSP on-the-fly compilation & feedback
- Alpha release with first pioneers
- Online playground
Q2 2023
- Code generation from blueprints into various languages
- Packages registry & first community libraries
- External audit & verification of the compiler
- Property-based testing framework
- Beta release & mainnet readiness