Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.55 KB

File metadata and controls

56 lines (39 loc) · 1.55 KB

rain.string

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.

Install

Via soldeer:

forge soldeer install rain-string~<version>

Develop

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 test

Tasks:

  • rainix-sol-test — forge test
  • rainix-sol-static — slither
  • rainix-sol-legal — reuse lint

Use the nix-pinned forge for all development.

License

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-legal

Contributions

Welcome under the same license. Contributors warrant that their contributions are compliant.