{"id":19358375,"url":"https://github.com/paritytech/revive","last_synced_at":"2026-02-05T19:00:47.653Z","repository":{"id":227330118,"uuid":"728829850","full_name":"paritytech/revive","owner":"paritytech","description":"Solidity compiler for Polkadot, targetting PolkaVM in pallet-revive","archived":false,"fork":false,"pushed_at":"2026-02-04T02:25:09.000Z","size":26650,"stargazers_count":96,"open_issues_count":27,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-04T05:41:33.628Z","etag":null,"topics":["blockchain","compiler","polkadot-sdk","solidity"],"latest_commit_sha":null,"homepage":"https://paritytech.github.io/revive/","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/paritytech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/roadmap.html","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-07T19:36:37.000Z","updated_at":"2026-02-02T13:12:34.000Z","dependencies_parsed_at":"2024-04-15T15:04:53.264Z","dependency_job_id":"5cd14b52-795a-418d-855e-a061481fbf05","html_url":"https://github.com/paritytech/revive","commit_stats":null,"previous_names":["xermicus/revive","paritytech/revive"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/paritytech/revive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Frevive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Frevive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Frevive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Frevive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/revive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Frevive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29130088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T18:55:47.139Z","status":"ssl_error","status_checked_at":"2026-02-05T18:55:04.010Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","compiler","polkadot-sdk","solidity"],"created_at":"2024-11-10T07:11:27.989Z","updated_at":"2026-02-05T19:00:47.640Z","avatar_url":"https://github.com/paritytech.png","language":"Rust","funding_links":[],"categories":["Solidity","Rust"],"sub_categories":["Other dialects and variants"],"readme":"![CI](https://github.com/paritytech/revive/actions/workflows/test.yml/badge.svg)\n[![Docs](https://img.shields.io/badge/paritytech.github.io/revive-brightgreen.svg)](https://paritytech.github.io/revive/)\n\n# revive\n\nYul recompiler to LLVM, targetting RISC-V on [PolkaVM](https://github.com/koute/polkavm).\n\nCheck the [docs](https://paritytech.github.io/revive/) or visit [contracts.polkadot.io](https://docs.polkadot.com/develop/smart-contracts/) to learn more about `revive` and contracts on Polkadot!\n\nDiscussion around the development is hosted on the [Polkadot Forum](https://forum.polkadot.network/t/contracts-update-solidity-on-polkavm/6949#a-new-solidity-compiler-1).\n\n\u003e [!WARNING]\n\u003e\n\u003e Solidity on PVM is running on the `pallet-revive` runtime. This introduces **observable semantic differences** in comparison with the EVM.\n\u003e \n\u003e Study the [differences](https://paritytech.github.io/revive/user_guide/differences.html) section carefully. **Ignoring these differences may lead to defunct contracts.**\n\u003e \n\u003e Notable examples:\n\u003e - The 63/64 gas rule isn't implemented in the pallet (introduces potential DoS vector when calling other contracts)\n\u003e - Contract instantiation works differently (by hash instead of by code)\n\u003e - The gas model implemented by `pallet-revive` differs from Ethereum \n\u003e - The heap size is fixed instead of gas-metered and there's a fixed amount of stack size (contracts working fine on EVM may trap on PVM)\n\n## Installation\n\nBuilding Solidity contracts for PolkaVM requires installing the following two compilers:\n- `resolc`: The revive Solidity compiler Yul frontend and PolkaVM code generator (provided by this repository).\n- `solc`: The [Ethereum Solidity reference compiler](https://github.com/ethereum/solidity/) implemenation.`resolc` uses `solc` during the compilation process, please refer to the [Ethereum Solidity documentation](https://docs.soliditylang.org/en/latest/installing-solidity.html) for installation instructions.\n\n### `resolc` binary releases\n\n`resolc` is distributed as a standalone binary (with `solc` as the only external dependency). Please download one of our [binary releases](https://github.com/paritytech/revive/releases) for your target platform and mind the platform specific instructions below. We also provide [nightly builds](https://paritytech.github.io/resolc-bin/#nightly).\n\n\u003cdetails\u003e\n  \u003csummary\u003eMacOS users\u003c/summary\u003e\n\n\u003e **MacOS** users need to clear the `downloaded` attribute from the binary and set the executable flag.\n\u003e ```sh\n\u003e xattr -rc resolc-universal-apple-darwin\n\u003e chmod +x resolc-universal-apple-darwin\n\u003e ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eLinux users\u003c/summary\u003e\n\n\u003e **Linux** users need to set the executable flag.\n\u003e ```sh\n\u003e chmod +x resolc-x86_64-unknown-linux-musl\n\u003e ```\n\n\u003c/details\u003e\n\n### `resolc` NPM package\n\nWe distribute the revive compiler as [node.js module](https://www.npmjs.com/package/@parity/resolc) and [hardhat plugin](https://www.npmjs.com/package/@parity/hardhat-polkadot-resolc).\n\nNote: The `solc` dependency is bundled via NPM packaging and defaults to the latest supported version.\n\n## Building from source\n\nBuilding revive requires a [stable Rust installation](https://rustup.rs/) and a C++ toolchain for building [LLVM](https://github.com/llvm/llvm-project) on your system.\n\n### LLVM\n\n`revive` depends on a custom build of LLVM `v18.1.8` with the RISC-V _embedded_ target, including the `compiler-rt` builtins. You can either download a build from our releases (recommended for older hardware) or build it from source.\n\n\u003cdetails\u003e\n  \u003csummary\u003eDownload from our LLVM releases\u003c/summary\u003e\n\nDownload the [latest LLVM build](https://github.com/paritytech/revive/releases?q=LLVM+binaries+release\u0026expanded=true) from our releases.\n\n\u003e **MacOS** users need to clear the `downloaded` attribute from all binaries after extracting the archive:\n\u003e ```sh\n\u003e xattr -rc \u003c/path/to/the/extracted/archive\u003e/target-llvm/gnu/target-final/bin/*\n\u003e ```\n\nAfter extracting the archive, point `$LLVM_SYS_181_PREFIX` to it:\n```sh\nexport LLVM_SYS_181_PREFIX=\u003c/path/to/the/extracted/archive\u003e/target-llvm/gnu/target-final\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eBuilding from source\u003c/summary\u003e\n\nThe `Makefile` provides a shortcut target to obtain a compatible LLVM build, using the provided [revive-llvm](crates/llvm-builder/README.md) utility. Once installed, point `$LLVM_SYS_181_PREFIX` to the installation afterwards:\n\n```sh\nmake install-llvm\nexport LLVM_SYS_181_PREFIX=${PWD}/target-llvm/gnu/target-final\n```\n\n\u003c/details\u003e\n\n### The `resolc` Solidity frontend\n\nTo build the `resolc` Solidity frontend executable, make sure you have obtained a compatible LLVM build and did export the `LLVM_SYS_181_PREFIX` environment variable pointing to it (see [above](#LLVM)).\n\nTo install the `resolc` Solidity frontend executable:\n\n```sh\nmake install-bin\nresolc --version\n```\n\n## Development\n\nPlease consult the [Developer Guide](https://paritytech.github.io/revive/developer_guide/contributing.html) to learn more about how contribute to the project.\n\n# Acknowledgements\n\nThe revive compiler project, after some early experiments with EVM bytecode translations, decided to fork the `era-compiler` framework.\n[Frontend](https://github.com/matter-labs/era-compiler-solidity), [code generator](https://github.com/matter-labs/era-compiler-llvm-context) and some supporting libraries are based of ZKSync `zksolc`. I'd like to express my gratitude and thank the original authors for providing a useable code base under a generous license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Frevive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Frevive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Frevive/lists"}