A bytecode level program emulator with per-step state proof. It can be used to generate challenge proof of optimistic rollup, and maybe other scenarios in blockchain which need program state proof.
The core idea is derived from cannon and qiling.
To cross compile crates to mips or other targets. You need:
The project contains two crates:
./omo
is the main entrypoint of the omo emulator../rust-mips-example
is an example crate. it is configured to build into a linux mips binary, which can be run byomo
.
First, we need to compile the 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
then we use the omo to run this target/mips-unknown-linux-musl/release/rust-mips-example
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
it will output:
Run ../rust-mips-example/target/mips-unknown-linux-musl/release/rust-mips-example
E1=a
E2=b
Arch: MIPS32 at present, will support more.
Executable File Format: ELF 32-bit MSB executable at present.
OS: Linux.
Apache License 2.0