Skip to main content

wasmer_compiler_singlepass/
lib.rs

1//! A WebAssembly `Compiler` implementation using Singlepass.
2//!
3//! Singlepass is a super-fast assembly generator that generates
4//! assembly code in just one pass. This is useful for different applications
5//! including Blockchains and Edge computing where quick compilation
6//! times are a must, and JIT bombs should never happen.
7//!
8//! Compared to Cranelift and LLVM, Singlepass compiles much faster but has worse
9//! runtime performance.
10
11#![allow(clippy::unnecessary_cast)]
12#![cfg_attr(docsrs, feature(doc_cfg))]
13
14#[cfg(target_os = "windows")]
15compile_error!(
16    "The Singlepass compiler backend is not supported on Windows. Use the V8 backend instead."
17);
18
19mod address_map;
20mod arm64_decl;
21mod codegen;
22mod common_decl;
23mod compiler;
24mod config;
25#[cfg(feature = "unwind")]
26mod dwarf;
27mod elf;
28mod emitter_arm64;
29mod emitter_riscv;
30mod emitter_x64;
31mod location;
32mod machine;
33mod machine_arm64;
34mod machine_riscv;
35mod machine_x64;
36mod riscv_decl;
37mod unwind;
38#[cfg(feature = "unwind")]
39mod unwind_winx64;
40mod x64_decl;
41
42pub use crate::compiler::SinglepassCompiler;
43pub use {crate::config::Singlepass, crate::config::SinglepassCallbacks};