Skip to content

rooch-network/flexEmu

Repository files navigation

OMO

Bytecode emulator with per-step state proof. It can be used to generate challenge proof of optimistic rollup, and other scenarios in blockchain which need state proof.

Platforms

Could emulate program built with:

  • Arch: MIPS32
  • OS: Linux
  • Executable File Format: ELF 32-bit MSB

May support more in the future.

Getting Started

The project contains two Rust crates:

  • ./omo : main entrypoint of the OMO emulator.
  • ./rust-mips-example: example crate. It is configured to build into a linux mips binary, which can be run by omo.

Prerequisites

Using Rust Cross

Using MUSL tools

  • Add mips-unknown-linux-musl supports:
rustup target add mips-unknown-linux-musl
  • Download musl toolchain from musl.cc: mips-linux-musl-cross

Run Example

Compile rust-mips-example:

cd ./rust-mips-example
cross build --target mips-unknown-linux-musl --release -v
# the compiled mips binary will be ./target/mips-unknown-linux-musl/release/rust-mips-example
file target/mips-unknown-linux-musl/release/rust-mips-example

If using MUSL tools:

cargo build --target mips-unknown-linux-musl --release --no-default-features

Compile OMO:

cargo build --release

Run:

cd ./omo
cargo run -- --config config.toml.example --env E1=a --env E2=b ../rust-mips-example/target/mips-unknown-linux-musl/release/rust-mips-example E1 E2

Output:

Run ../rust-mips-example/target/mips-unknown-linux-musl/release/rust-mips-example
E1=a
E2=b

License

Distributed under the Apache License 2.0. See LICENSE for more information.

Acknowledgments

About

General purpose bytecode emulator with per-step proof

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published