Skip to main content

neo_decompiler/
lib.rs

1//! Neo N3 NEF inspection, disassembly, and decompilation tooling.
2//!
3//! This crate provides a well-tested toolkit for parsing NEF containers,
4//! decoding Neo VM bytecode, building CFG/SSA views, and rendering both
5//! high-level and C#-style outputs. It exposes the same core engine used by
6//! the CLI binary in this repository, so library and command-line workflows
7//! stay aligned.
8
9#![forbid(unsafe_code)]
10#![warn(missing_docs)]
11#![warn(rust_2018_idioms)]
12
13#[cfg(feature = "cli")]
14pub mod cli;
15pub mod decompiler;
16pub mod disassembler;
17pub mod error;
18pub mod instruction;
19pub mod manifest;
20pub mod native_contracts;
21pub mod nef;
22pub mod syscalls;
23mod util;
24#[cfg(feature = "web")]
25pub mod web;
26
27pub use crate::decompiler::analysis::call_graph::{CallEdge, CallGraph, CallTarget};
28pub use crate::decompiler::analysis::types::{MethodTypes, TypeInfo, ValueType};
29pub use crate::decompiler::analysis::xrefs::{MethodXrefs, SlotKind, SlotXref, Xrefs};
30pub use crate::decompiler::analysis::MethodRef;
31pub use crate::decompiler::cfg::ssa::{
32    DominanceInfo, PhiNode, SsaBlock, SsaConversion, SsaExpr, SsaForm, SsaStats, SsaStmt,
33    SsaVariable,
34};
35pub use crate::decompiler::cfg::{
36    BasicBlock, BlockId, Cfg, CfgBuilder, Edge, EdgeKind, Terminator,
37};
38pub use crate::decompiler::{Decompilation, Decompiler, OutputFormat};
39pub use crate::disassembler::{Disassembler, UnknownHandling};
40pub use crate::error::{Error, Result};
41pub use crate::instruction::{Instruction, OpCode, Operand};
42pub use crate::manifest::{ContractManifest, ManifestAbi, ManifestFeatures, ManifestMethod};
43pub use crate::nef::{MethodToken, NefFile, NefHeader, NefParser};