Maru
  • Introduction
  • Volume use cases
  • Architecture overview
  • Maru Roadmap
  • ZK IMPLEMENTATION
    • Schema
      • Sum proof
      • Search proof
      • Data proof
      • Keccak proof
      • KeccakSponge proof
      • Logic proof
      • Arithmetic proof
    • Plonky2 verifier in Circom
  • user guide
    • Maru Demo FAQ
      • Why event proofs?
      • Why starky?
    • Deployed contracts
  • Maru ZKVM
    • Computer architecture
    • Memory model
    • Instruction set architecture
      • Instructions Execution
      • Instruction set
      • Instruction encoding
    • High-level frontend
    • Domain Specific Language
      • Unary map
      • Zip and binary map
      • Filter for all ETH-USDC swap prices on Uniswap
      • Calculate a 24-hour block-by-block moving average of the ETH-USDC pair on Uniswap
      • Compiler optimizations
Powered by GitBook
On this page
  1. Maru ZKVM

Domain Specific Language

PreviousHigh-level frontendNextUnary map

Last updated 1 year ago

One of the most important aspects of creating dataflows in Maru is that developers can program their own operators using the built-in DSL embedded in the compiler. The code for each custom operator is compiled into a separate binary file for the zkVM. In a single shared description file, the input streams and connections between operators in the dataflow graph are defined. These bytecode and description files are then loaded into the "operator registry," from which the protocol updates its representation of the data stream and executes it.

Below are several examples of how the code for programs utilizing the DSL capabilities to create custom operators might look, according to our expectations:

Unary map
Zip and binary map
Filter for all ETH-USDC swap prices on Uniswap
Calculate a 24-hour block-by-block moving average of the ETH-USDC pair on Uniswap
Compiler optimizations