Skip to main content

Crate move_neovm

Crate move_neovm 

Source
Expand description

Move Bytecode to NeoVM Translator

This crate provides a minimal Move bytecode → WASM translator to feed the wasm-neovm pipeline. The lowering is experimental and does not cover the full Move semantics yet.

§Pipeline

Move Source → Move Compiler → Move Bytecode → move-neovm → WASM → wasm-neovm → NEF

§Usage

use move_neovm::{parse_move_bytecode, translate_to_wasm};

// Parse Move bytecode
let module = parse_move_bytecode(&bytecode)?;

// Translate to WASM
let wasm = translate_to_wasm(&module)?;

// Then use wasm-neovm to generate NEF

§Challenges

Move has unique features that don’t map directly to WASM/NeoVM:

  • Linear resource types (no copy/drop without ability)
  • Module system with publishing semantics
  • Global typed storage model

These require runtime emulation or compile-time transformation.

Re-exports§

pub use bytecode::parse_move_bytecode;
pub use bytecode::validate_move_bytecode;
pub use bytecode::BytecodeVersion;
pub use bytecode::FieldDef;
pub use bytecode::FunctionDef;
pub use bytecode::MoveModule;
pub use bytecode::MoveOpcode;
pub use bytecode::StructDef;
pub use bytecode::TypeTag;
pub use runtime::global_storage_key;
pub use runtime::signer_to_checkwitness;
pub use runtime::ResourceError;
pub use runtime::ResourceTracker;
pub use translator::translate_to_wasm;

Modules§

bytecode
Move bytecode parsing module
runtime
Move runtime support for NeoVM
translator
Move to WASM/NeoVM translator

Structs§

MoveModuleMetadata
Metadata about the translated Move module
MoveTranslation
Translation result containing WASM module bytes

Functions§

is_move_bytecode
Check if the given bytes appear to be valid Move bytecode
translate_move_to_wasm
Translate Move bytecode to WASM