{"id":27770816,"url":"https://github.com/rooch-network/flexemu","last_synced_at":"2025-04-29T21:17:41.373Z","repository":{"id":43266742,"uuid":"490311599","full_name":"rooch-network/flexEmu","owner":"rooch-network","description":"General purpose bytecode emulator with per-step proof","archived":false,"fork":false,"pushed_at":"2023-08-20T16:58:15.000Z","size":782,"stargazers_count":35,"open_issues_count":12,"forks_count":6,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-29T21:17:35.990Z","etag":null,"topics":["blockchain","rollup","rust","vm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rooch-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-05-09T14:12:05.000Z","updated_at":"2024-02-20T22:11:13.000Z","dependencies_parsed_at":"2023-08-20T17:09:35.549Z","dependency_job_id":null,"html_url":"https://github.com/rooch-network/flexEmu","commit_stats":null,"previous_names":["rooch-network/flexemu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooch-network%2FflexEmu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooch-network%2FflexEmu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooch-network%2FflexEmu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rooch-network%2FflexEmu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rooch-network","download_url":"https://codeload.github.com/rooch-network/flexEmu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251582937,"owners_count":21612747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","rollup","rust","vm"],"created_at":"2025-04-29T21:17:40.778Z","updated_at":"2025-04-29T21:17:41.363Z","avatar_url":"https://github.com/rooch-network.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flexEmu\n\nGeneral purpose bytecode emulator with per-step proof.\nIt can be used to generate challenge proof of optimistic rollup,\nand other scenarios in blockchain which need state proof.\n\nSee more introductions here: [en](docs/overview.md) / [zh](docs/ch/overview.md).\n\n## Platforms\n\nflexEmu could emulate program built with:\n\n- **Arch**: MIPS32\n- **OS**: Linux\n- **Executable File Format**: ELF 32-bit MSB\n\nMay support more in the future.\n\n### Development Environment\n\nX86-64 Linux \u0026 Apple Silicon MacOS.\n\n***X86-64 Linux:***\n\nFully supported, for developing and production environment. Any issue will be fixed soon.\n\n***Apple Silicon MacOS:***\n\nNot fully supported yet, only for developing.\n\n## Getting Started\n\nThe project contains three major Rust crates:\n\n- [`./flexemu` ](flexemu): main entrypoint of the flexEmu emulator.\n- [`./rust-mips-example`](rust-mips-example): examples crate. It is configured to build into a linux mips binary, which\n  can be run by `flexEmu`.\n- [`./flexemu-workflow`](flexemu-workflow): Rust binary to demonstrate how flexEmu work with onchain contracts to provide\n  interacting fraud proof.\n\n### Prerequisites\n\n- [rust](https://rustup.rs/)\n- [musl](https://musl.cc)\n\n#### Installing MUSL toolchains\n\n- Add mips-unknown-linux-musl target for rust:\n\n```shell\nrustup target add mips-unknown-linux-musl\n```\n\n- Download musl toolchain from [musl.cc](https://musl.cc): mips-linux-musl-cross\n\n- ***For Apple Silicon:***\n\n```shell\nbrew tap richard-vd/musl-cross\nbrew install richard-vd/musl-cross/musl-cross --without-x86_64 --with-mips\n```\n\n### Run Example\n\n**Compile `rust-mips-example`:**\n\n```shell\ncargo build --target mips-unknown-linux-musl --release \n```\n\n**Compile `flexEmu`:**\n\n```shell\ncargo build --release\n```\n\n**Run Example1:**\n\n```shell\nRUST_LOG=error ./flexemu --config config.toml.example run --env E1=a --env E2=b ../target/mips-unknown-linux-musl/release/rust-mips-example E1 E2\n```\n\n**Output:**\n\n```\nRun rust-mips-example\nE1=a\nE2=b\n```\n\n**Run Example2:**\n\n```shell\nRUST_LOG=error ./flexemu --config config.toml.example run ../rooch/flexemu/target/mips-unknown-linux-musl/release/arith-example 1 11\n```\n\n**Output:**\n\n```\nthread 'main' panicked at 'assertion failed: `(left == right)`\n  left: `10`,\n right: `11`: expect 11, but got 10', rust-mips-example/src/arith_example.rs:13:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n```\n\n## License\n\nDistributed under the Apache License 2.0. See [LICENSE](LICENSE) for more information.\n\n## Acknowledgments\n\n- [Cannon](https://github.com/ethereum-optimism/cannon)\n- [Unicorn](https://github.com/unicorn-engine/unicorn)\n- [Qiling](https://github.com/qilingframework/qiling)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frooch-network%2Fflexemu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frooch-network%2Fflexemu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frooch-network%2Fflexemu/lists"}