Module wasm_to_rust

Module wasm_to_rust 

Source
Expand description

Host offline WebAssembly-to-safe-Rust substitute transpiler with exact V2 structural-checkpoint metering (V2CheckpointPlanner) parity.

Structs§

SubstituteBundleInput
Single compiled WebAssembly snapshot fed into transpile_wasm_bundle_to_safe_rust.
TranspileWasmOptions
Options controlling generated Rust module metadata and source hashing.

Functions§

transpile_wasm_bundle_to_safe_rust
Transpiles a bundle of uninstrumented canonical WebAssembly snapshots into uniform .ctbnodes-prefixed safe-Rust chunk files (<chunk_prefix>.generated.rs) plus a generated registry.generated.rs manifest.
transpile_wasm_to_safe_rust
Transpiles an uninstrumented canonical WebAssembly binary into a standalone safe-Rust substitute module implementing exact V2 structural-checkpoint metering.
transpiler_fingerprint_sha256
Returns a deterministic SHA-256 fingerprint of the transpiler and V2 metering planner sources so offline substitute regeneration invalidates whenever codegen changes.
validate_wasm_for_substitute
Validates whether wasm_bytes can be analyzed into a safe-Rust substitute module (supported imports, value types, opcodes, and "step"/"main" entry) without formatting standalone Rust source text.