Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.29 KB

File metadata and controls

30 lines (23 loc) · 1.29 KB

Sonatina

Sonatina is a compiler backend specialized for smart contracts.

Sonatina is really early stage in development, so do NOT use it for production!

Project layout

sonatina consists of several crates.

  • codegen: The main crate of sonatina, providing builder for IR modules and functions, optimization passes, instruction selection DAG, and binary code emitting.
  • filecheck: Provides test runner for filecheck and test fixtures.
  • interpreter: Interpreter for sonatina IR, this is mainly for testing transformation passes.
  • ir: sonatina intermediate representation.
  • parser: Parser for sonatina IR, this is mainly for filecheck test.
  • triple: Provides target triple for smart contracts.
  • verifier: Verifier for sonatina IR, this is mainly for testing transformation passes.

TODO

Test

Run test_all.sh.

Profiling

Sonatina emits tracing spans across parsing, verification, optimization, object compilation/linking, and EVM lowering. See docs/profiling.md for setup and usage.