{"id":24066305,"url":"https://github.com/rainlanguage/rain.interpreter","last_synced_at":"2025-04-23T21:47:19.761Z","repository":{"id":155817212,"uuid":"629873222","full_name":"rainlanguage/rain.interpreter","owner":"rainlanguage","description":"Solidity library for implementing Rain compatible interpreters.","archived":false,"fork":false,"pushed_at":"2024-10-24T11:00:34.000Z","size":5947,"stargazers_count":13,"open_issues_count":30,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-10-25T03:10:12.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rainlanguage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-19T07:44:57.000Z","updated_at":"2024-10-09T10:27:16.000Z","dependencies_parsed_at":"2023-09-24T10:43:13.203Z","dependency_job_id":"d41ab6fc-8550-4b29-99c2-01ecdb8db80a","html_url":"https://github.com/rainlanguage/rain.interpreter","commit_stats":null,"previous_names":["rainprotocol/rain.interpreter","rainlanguage/rain.interpreter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frain.interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frain.interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frain.interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainlanguage%2Frain.interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainlanguage","download_url":"https://codeload.github.com/rainlanguage/rain.interpreter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233182855,"owners_count":18637834,"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":[],"created_at":"2025-01-09T11:40:01.374Z","updated_at":"2025-01-09T11:40:02.111Z","avatar_url":"https://github.com/rainlanguage.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rain.interpreter\n\nSolidity docs can be generated with `nix develop --command forge doc -b`.\n\nRust docs with `nix develop --command cargo doc`.\n\n## Overview\n\nStandard libraries and interfaces defining and working with `InterpeterState` including:\n\n- the standard `eval` loop\n- source compilation from opcodes\n- state (de)serialization (more gas efficient than abi encoding)\n\nInterpreters are designed to be highly moddable behind the `IInterpreterV1`\ninterface, but pretty much any interpreter that uses `InterpreterState` will\nneed these low level facilities verbatim. Further, these facilities\n(with possible exception of debugging logic), while relatively short in terms\nof lines of code, are surprisingly fragile to maintain in a gas efficient way\nso we don't recommend reinventing this wheel.\n\n## Versioning\n\nStability and versioning is achieved at the interface level. All interfaces and\ntypes exposed externally by an interface are versioned.\n\nThe most obvious place this fails is when a breaking change cannot be expressed\nin Solidity's type system.\n\nFor example, the ordering of \"top to bottom\" of a stack returned by an\ninterpreter, represented as a `uint256[]` was reversed between `eval` and\n`eval2`. The compiler cannot protect downstream contracts from such a change,\neven if we were to scream it in the code comments, so such changes are considered\ndangerous and justify a version number at the method level\n(e.g. `eval` and `eval2`).\n\nThe goal is to intentionally loudly break things at the compiler level, or at\nleast _reliably_ at runtime (i.e. unconditionally erroring every call to X). We\ndo NOT want to make silent subtle changes on the hope that nobody was relying on\nthe old behaviours.\n\n### Unstable interfaces\n\nAn unstable interface MAY be used by a current implementation in this repo as the\ngoal is always to move unstable interfaces to stability.\n\nThe practical challenge for achieving stability is that it has to be informed by\nusage, or at least attempted usage.\n\nStability is therefore _observed_ in some interface, based on some (subjective)\namount of usage in a concrete implementation without the kind of feedback that\nnecessitates a modification.\n\n### Deprecated interfaces\n\nDeprecated interfaces are those that were completely stable, with deployed\nconcrete implementations, then replaced by a new implementation of an unstable\ninterface.\n\nAs there are immutable concrete implementations in production of these ex-stable\ninterfaces, we keep the interfaces so that third party contracts can continue to\nconsume existing deployments.\n\nThis is important for existing deployments to leverage their \"lindy\", as often\nthe old battletested thing can be much safer than the new shiny thing.\n\n### NO semver\n\nWe do NOT use semver because it requires us to make subjective assessments with\nimperfect information about concepts like \"breaking\" or \"bug\".\n\n## Branches\n\n`main` includes the latest implementations of the latest interfaces, including\nunstable interfaces.\n\nWhile we keep deprecated interfaces around for a long time, we try to avoid cruft\nof deprecated concrete implementations, libs and tests. This cruft can really\nhinder the ability to move through necessary refactors, so it has to be culled\noften.\n\nAs every commit is deployed to a testnet by CI, and is immutable onchain and can\nbe cross deployed to other chains, there's no need to try to couple what's\nhappening in this repo with onchain realities, other than at the interface level.\n\nThere are some branches that were forked from `main` for historical reasons, that\nMAY be of interest situationally, but otherwise should be ignored.\n\n- `main-np`: Forked from the last commit using `eval` before `eval2` was the\n  primary interface into the interpreter. No longer actively developed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainlanguage%2Frain.interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainlanguage%2Frain.interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainlanguage%2Frain.interpreter/lists"}