Low-level string and parsing primitives used to build Rainlang. Specialised parsing logic lives in dedicated Rainlang repos; this is the broadly-applicable, gas-efficient base.
Parsing in Rainlang works like a bloom filter over individual characters. Read a
byte from memory, bit-shift, compare against a 32-byte mask representing
characters of interest (e.g. 0-9, or a-zA-Z0-9). No regexes, in-memory sets,
or loops — every ASCII char fits unambiguously in a single 32-byte EVM word.
Via soldeer:
forge soldeer install rain-string~<version>This repo uses nix. The default shell is the
slim sol-shell from rainix.
nix develop # enter the shell
forge soldeer install # install deps declared in foundry.toml
forge testTasks:
rainix-sol-test—forge testrainix-sol-static— slitherrainix-sol-legal—reuse lint
Use the nix-pinned forge for all development.
Tag v<x.y.z> on main. The
Publish to Soldeer wrapper delegates
to rainix's reusable workflow, which derives the package name from the repo name
(rain.string → rain-string).
DecentraLicense 1.0 (DCL-1.0) — full text in
LICENSES/. Roughly CAL-1.0
(opensource.org) plus user-data
disclosure obligations consistent with permissionless-blockchain assumptions.
This repo is REUSE 3.2 compliant. Verify locally:
nix develop -c rainix-sol-legalWelcome under the same license. Contributors warrant that their contributions are compliant.