Skip to main content

neo_decompiler/
lib.rs

1//! Minimal Neo N3 NEF bytecode tooling.
2//!
3//! This crate provides a deliberately small and well tested toolkit for
4//! inspecting Neo N3 NEF files.  It focuses on parsing the NEF container,
5//! decoding a handful of common opcodes, and exposing a simple API that other
6//! applications (including the CLI binary in this repository) can use.
7
8#![forbid(unsafe_code)]
9#![warn(missing_docs)]
10#![warn(rust_2018_idioms)]
11
12#[cfg(feature = "cli")]
13pub mod cli;
14pub mod decompiler;
15pub mod disassembler;
16pub mod error;
17pub mod instruction;
18pub mod manifest;
19pub mod native_contracts;
20pub mod nef;
21pub mod syscalls;
22mod util;
23
24pub use crate::decompiler::analysis::call_graph::{CallEdge, CallGraph, CallTarget};
25pub use crate::decompiler::analysis::types::{MethodTypes, TypeInfo, ValueType};
26pub use crate::decompiler::analysis::xrefs::{MethodXrefs, SlotKind, SlotXref, Xrefs};
27pub use crate::decompiler::analysis::MethodRef;
28pub use crate::decompiler::cfg::ssa::{
29    DominanceInfo, PhiNode, SsaBlock, SsaConversion, SsaExpr, SsaForm, SsaStats, SsaStmt,
30    SsaVariable,
31};
32pub use crate::decompiler::cfg::{
33    BasicBlock, BlockId, Cfg, CfgBuilder, Edge, EdgeKind, Terminator,
34};
35pub use crate::decompiler::{Decompilation, Decompiler, OutputFormat};
36pub use crate::disassembler::{Disassembler, UnknownHandling};
37pub use crate::error::{Error, Result};
38pub use crate::instruction::{Instruction, OpCode, Operand};
39pub use crate::manifest::{ContractManifest, ManifestAbi, ManifestFeatures, ManifestMethod};
40pub use crate::nef::{MethodToken, NefFile, NefHeader, NefParser};