Skip to main content

wasm_pvm/
lib.rs

1#![allow(
2    clippy::too_many_lines, // TODO: Remove after refactoring lowering.rs (Task #30)
3    clippy::missing_errors_doc // TODO: Add docs in V2 (Task #34/Documentation)
4)]
5
6pub mod abi;
7pub mod error;
8pub mod memory_layout;
9pub mod pvm;
10pub mod spi;
11
12#[cfg(feature = "compiler")]
13pub mod llvm_backend;
14#[cfg(feature = "compiler")]
15pub mod llvm_frontend;
16#[cfg(feature = "compiler")]
17pub mod translate;
18
19/// Test harness module for writing unit and integration tests.
20///
21/// This module is only available when running tests or when the
22/// `test-harness` feature is enabled.
23#[cfg(any(test, feature = "test-harness"))]
24pub mod test_harness;
25
26pub use error::{Error, Result};
27pub use pvm::{Instruction, Opcode, ProgramBlob};
28pub use spi::SpiProgram;
29
30#[cfg(feature = "compiler")]
31pub use translate::{
32    CompileOptions, ImportAction, OptimizationFlags, compile, compile_with_options,
33    compile_with_stats,
34};
35
36#[cfg(feature = "compiler")]
37pub use translate::stats::CompileStats;