Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .cargo/config.toml

This file was deleted.

1,573 changes: 0 additions & 1,573 deletions .gas-snapshot

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/crates-release.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/manual-sol-artifacts.yaml

This file was deleted.

32 changes: 7 additions & 25 deletions .github/workflows/package-release.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
name: Package Release
# Deploy-shaped repo: the `rainlang` Soldeer package is released by a manual
# `sol-v*` tag via rainix-tag-release, never by a merge.
#
# rainix-autopublish's merge-driven next-version lifecycle is wrong for this
# shape. `[external.package].version` in `foundry.toml` is the LAST published
# revision and names the frozen `src/generated/<tag>/` record cut with it, so
# it may only move in lockstep with a deployment that already happened. The
# tag flow enforces exactly that: it re-runs the suite, then `release-guard`
# checks version == tag, the frozen dir present, byte-identical to a freshly
# regenerated `candidate/`, no later release frozen and a clean tree — then
# publishes.
#
# Push-free: the frozen snapshot and the version bump reach main through a
# reviewed PR BEFORE the tag, and this workflow commits nothing, so it works
# against a protected main.
#
# The Rust crates are NOT released here — see `crates-release.yaml`. They are
# ordinary bindings whose version tracks code changes and is safe to bump on
# merge, and coupling them to this trigger is what wedged the release lane.
#
# `snapshot-generate-cmd` is deliberately absent: it was removed org-wide and
# is no longer an input at all.
# Library repo: the `rainlang` Soldeer package autopublishes on every merge to
# main under rainix-autopublish's next-version lifecycle. The deployed
# contracts, their deploy records and the manual `sol-v*` tag flow live in
# rainlang.deploy.
on:
push:
tags:
- sol-v*
branches:
- main
jobs:
release:
uses: rainlanguage/rainix/.github/workflows/rainix-tag-release.yaml@main
uses: rainlanguage/rainix/.github/workflows/rainix-autopublish.yaml@main
with:
soldeer-package: rainlang
secrets: inherit
5 changes: 0 additions & 5 deletions .github/workflows/rainix-rs-static.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/rainix-rs-test.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
crates/abi/
7 changes: 0 additions & 7 deletions .soldeerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.DS_Store
.cargo
.coderabbit.yaml
.devcontainer.json
.envrc
.gas-snapshot
.git
.github
.gitignore
Expand All @@ -14,11 +12,8 @@
.vscode
CLAUDE.md
TESTING.md
Cargo.lock
Cargo.toml
/audit
/cache
/crates
/dependencies
/flake.lock
/flake.nix
Expand All @@ -30,7 +25,5 @@ Cargo.toml
/slither.config.json
/soldeer.lock
/REUSE.toml
/deployments
/meta
/script
/target
60 changes: 31 additions & 29 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,50 @@ Guidance for Claude Code in this repo. This file takes precedence over session
summaries — re-read it as written rather than trusting a summary's framing of
what a process means.

## Generated code
## What this repo is

The **library half** of Rainlang: the parser, eval loop, standard ops, integrity
checks, the `BaseRainlang*` contracts and the extern / sub-parser bases,
published as the `rainlang` Soldeer package on every merge to main
(`rainix-autopublish`, next-version lifecycle via `next-v*` tags). The deployed
concretes, their generated tables and deploy records, the deploy scripts and the
Rust crates live in `rainlang.deploy`, which consumes this package.

`script/Build.sol` writes ALL of it. Never hand-edit:
`src/concrete/extern/RainlangReferenceExtern.sol` is a reference implementation
of the extern and sub-parser bases, not a deployable: it stays here with its
tests.

- `src/generated/<Name>Pointers.sol` — parse meta, function pointer tables, meta
hashes. Committed because contract and pointers file depend on each other
circularly.
- `src/generated/candidate/<Name>.sol` — each deployed contract's rolling deploy
snapshot: hash, Zoltu address, creation/runtime code, dependencies.
- `src/generated/<x_y_z>/` — FROZEN release records. Append-only: never
regenerate, move or delete a tag dir.
- `src/lib/Lib*Released.sol` and `src/lib/LibReleasedSuites.sol`.
## Generated code

After any source change affecting bytecode:
`script/Build.sol` writes `src/generated/RainlangReferenceExternPointers.sol` —
the reference extern's parse meta, function pointer tables and meta hash.
Committed because contract and pointers file depend on each other circularly.
Never hand-edit it. `src/generated/0_1_9/` is the frozen record of the last
release this repo cut while it still carried the deploy half; nothing here reads
it, and it stays because frozen snapshots are append-only org-wide (rainix
`frozen-snapshots-append-only`). After any source change affecting the extern's
bytecode:

1. `nix develop -c rainlang-prelude`
2. `nix develop -c forge script --silent ./script/Build.sol`
3. `nix develop -c forge fmt`
4. Repeat until `src/generated/` stops changing — deploy constants cascade
parser → expression deployer → Rainlang; interpreter also cascades to
Rainlang.

Address all `forge build` warnings before pointer rebuild, tests, or the next
task.

## Deploy and release

`src/abstract/RainlangDeploySuites.sol` is the ONE declaration of what this repo
deploys. `script/Deploy.sol`, `script/Build.sol` and the deploy tests all read
it; a deployment declared anywhere else is invisible to all three.
## Test harness

`[external.package].version` in `foundry.toml` is the LAST Soldeer publish, not
a next-version slot: a normal PR never moves it. Releasing is deploy (Manual sol
artifacts) → verify (`RainlangDeployChainTest`) → a PR carrying `cutRelease()`'s
frozen dir and the version bump → merge → push `sol-v<x.y.z>`.
`test/concrete/Test*.sol` are the `BaseRainlang*` contracts built from current
source with no generated tables; `test/lib/deploy/LibTestInterpreterDeploy.sol`
places them at fixed test addresses and
`test/abstract/RainlangExpressionDeployerDeploymentTest.deployRainlang()` is the
one hook that binds them. `rainlang.deploy` and the word repos override that
hook with the deployed pins, so `test/` ships in the package: `/test` is
deliberately absent from `.soldeerignore`.

Three things look wrong and are load-bearing: `optimizer_runs = 1000000` (not
the org's 100000 — it is baked into every live CREATE2 address here); `/test`
absent from `.soldeerignore` (raindex imports `test/abstract/OpTest.sol` through
the published package); and `src/lib/deploy/LibInterpreterDeploy.sol` being
hand-written rather than a generated alias lib (its constant names and
`etchRainlang` are a published consumer API).
`optimizer_runs = 1000000` looks wrong (the org uses 100000) and is
load-bearing: every live CREATE2 address in `rainlang.deploy` is a pure function
of the bytecode this package's sources compile to.

## Conventions

Expand Down
Loading
Loading