Skip to content

About

Raku modules developed on Raku++ and tested on both engines — one repository, one distribution per directory

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

146 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raku-modules

Raku modules written here and published to the ecosystem. Each one is developed on Raku++ and tested on both engines — Rakudo and rakupp — before it is released.

They are modules for Raku, not for Raku++. The aim of Raku++ is to work everywhere Rakudo does, so anything published from here has to run on both.

What is here

distribution version Rakudo v2026.07 Raku++ v1.8.0
HTTP::Simple — a batteries-included HTTP client 0.0.1 107/107 107/107
App::Rakus — rakus, a static HTTP file server 0.0.2 37/37 37/37
CSV::Native — CSV parsing and writing, native on Raku++, pure Raku elsewhere 0.0.1 145/145 251/251
Digest::Native — MD5, SHA-1, SHA-2 and HMAC 0.0.1 343/343 † 354/354 †
Compress::Zlib::Native — gzip and zlib without libz 0.0.1 156/156 † 154/154 †
Data::Native — one portable use line over all five families 0.0.1 68/68 † 68/68 †
Prompt::Hidden — prompt with a :hidden adverb 0.0.3 31/31 ‡ 31/31 ‡
L10N::RU — Raku written with Russian keywords 0.0.1 16/16 § 14/16 §
L10N::UK — Raku written with Ukrainian keywords 0.0.1 16/16 § 14/16 §
L10N::LV — Raku written with Latvian keywords 0.0.1 16/16 § 15/16 §
Math::Wavelet — discrete and continuous wavelet transforms, pure Raku, PyWavelets-compatible 0.0.2 2726/2726 ¶ 2726/2726 ¶
TOML::Native — TOML v1.0.0 parsing and writing, native on Raku++, pure Raku elsewhere 0.0.1 250/250 432/432
Text::Diff::Native — line and unified diffs (Myers O(ND)), native on Raku++, pure Raku elsewhere 0.0.1 643/643 1265/1265
YAML::Native — YAML 1.2 parsing and writing, native on Raku++, pure Raku elsewhere 0.0.1 237/237 461/461
Arduino — a stub: use Arduino is built into Raku++, and anywhere else it says so 0.0.1 6/6 ‖ 6/6 ‖
Arduino::LEDMatrix — a stub: the Uno R4 WiFi's LED matrix is built into Raku++, and anywhere else it says so 0.0.1 6/6 ‖ 6/6 ‖
Arduino::WiFi — a stub: the Uno R4 WiFi's network is built into Raku++, and anywhere else it says so 0.0.1 6/6 ‖ 6/6 ‖
MicroBit — a stub: use MicroBit, the BBC micro:bit, is built into Raku++, and anywhere else it says so 0.0.1 6/6 ‖ 6/6 ‖

† Measured on Rakudo v2026.08 and Raku++ 3.25.0, which is also their floor: both reach the extension ABI through rakupp-ext-load. The two Raku++ counts are lower than they look — three assertions are todo there, all of them pointing at one engine bug (a module's own use imports leak into whatever imports that module), and the Digest count is higher because the million-byte vectors are skipped on the pure-Raku fallback.

Nothing has been released to the ecosystem yet.

v1.8.0 is the minimum Raku++ for both, not just the version they were tried on: each needs engine fixes that landed after v1.8.0's predecessor, and against an older binary the suites fail rather than degrading. Rakudo has no such floor — nothing here depends on a recent one.

‡ Prompt::Hidden is measured on Rakudo v2026.08 and Raku++ 3.26.0, and 3.26.0 is its floor for two reasons at once: prompt(:hidden) is an engine primitive that landed there, and below it the module's stty fallback cannot work on a terminal anyway — every child run spawned was put in its own process group, so stty -echo took SIGTTOU and stopped. Its 31 assertions all run on pipes, where there is no echo to suppress, so the suite passes on an engine where the module does not actually work; the terminal behaviour is verified separately under a pseudo-terminal and the matrix is in the notes.

§ Measured on Rakudo v2026.08 and Raku++ 3.28.0, neither of them an established floor. The three are one distribution shape repeated: a generated slang and its matching deparser, plugged into the L10N family. They are the first modules here that need RakuAST — a slang is a grammar mixin, so there is nothing to install it into without one — and the surprise is that Raku++ 3.28.0 has enough of it to run them, use L10N::RU; at the top of a file included. What it still misses is todo in each suite and written up in each README: a private attribute named outside the Latin script is unreachable there (which is why the two Cyrillic counts are the lower ones, and Latvian's is not), and DEPARSE($localization) ignores the localization it is handed.

Each is generated from a .l10n table by update-localization, the script the L10N distribution installs, and each translates 405 of Raku's 645 translatable names. my is the one that cannot be translated properly: Slavic and Baltic possessives agree in gender, so no single spelling of it is right in front of every variable name, and what ships is the citation form.

¶ Measured on Rakudo v2026.09 and a Raku++ 5.3.0 development build, neither of them an established floor. Every expected value in its suite comes from PyWavelets 1.8.0, and so does its table of 106 discrete wavelets.

TOML::Native and Text::Diff::Native were tried on Rakudo v2026.08 and Raku++ 4.0.1, and YAML::Native on Rakudo v2026.08 and Raku++ 4.0.1-160; those are the versions their counts come from — not established floors, since no older engine has been tried.

‖ Arduino, Arduino::LEDMatrix, Arduino::WiFi and MicroBit are the four distributions here not meant to work on every Raku, and they have no code to work with. The names are built into Raku++ (planned in rakupp's docs/dev/plans/ARDUINO-PLAN.md and MICROBIT-PLAN.md), and on any other Raku these modules stop the program and say it needs Raku++. Measured on Rakudo v2026.09 and Raku++ 5.5.0-360, neither of them a floor; Arduino::WiFi on Rakudo v2026.09 and on a Raku++ 5.6.3 without the name and one with it; MicroBit on Rakudo v2026.09, on a Raku++ 5.7.0-98 without the name and on 5.8.0-171, rakupp's main, with it. Until a rakupp release answers the names itself, the Raku++ column runs the suites' "older Raku++" branch.

Layout

One directory per distribution, each a complete distribution root:

HTTP-Simple/
    META6.json
    lib/HTTP/Simple.rakumod
    t/

The directory name is the distribution name with :: written -, which is the convention zef uses when it unpacks one.

Anything a README measures against lives OUTSIDE the distribution directory, under benchmarks/<topic>/ — the corpora, the generator that made them and the timing scripts — so a reader can re-run the numbers from the repository while an install from the ecosystem carries none of it:

  • benchmarks/csv — the CSV::Native corpora (1k to 100k rows)
  • benchmarks/toml — the TOML::Native conformance suite (toml-test 1.0.0) and corpora
  • benchmarks/diff — the Text::Diff::Native corpora and the comparison against GNU diff
  • benchmarks/yaml — the YAML::Native conformance suite (yaml-test-suite) and corpora

Each distribution's README documents the module, and follows the one shape written down in notes/README-shape.md. Why it is shaped that way, and what running it under two engines turned up, goes in notes/<Dist>.md — outside the distribution, so it is a design log rather than something a user installing the module has to read past:

The two **::Native distributions added for the Data::Native campaign each carry their conformance vectors INSIDE t/vectors/, together with the generator that produced them from an independent oracle — the system openssl for the digests, real libz and the system gzip for the compression. Those files are meant to be shared with the engine's own implementations of the same formats when those land, which is what keeps two deliberately separate codebases agreeing; see docs/dev/plans/NATIVE-MODULES-PLAN.md in the Raku++ repository.

Why one repository

The ecosystem overwhelmingly publishes one repository per distribution — of the 567 distributions in the Raku Ecosystem Archive that declare an upstream repository, only nine publish more than one, and most of those are renames sitting side by side. This repository is deliberately the exception, for as long as that stays useful:

  • Every module here exists partly to be run under two engines. One repository means one CI that runs every distribution under both, and one place where "all of them pass on both" is an invariant rather than a spreadsheet.
  • When a module turns up an engine bug — the expected outcome, not the surprising one — the fix lands in Raku++ and everything here gets re-run. That is a single-repository operation.

A module moves to its own repository when it earns it: an outside contributor, a release cadence of its own, or its own issue traffic. Splitting is cheap and lossless (git subtree split -P <dir>), the distribution name does not change, and nobody installing it notices. Merging later would not be cheap, which is why the default starts here.

Naming

Modules ship under their functional name — HTTP::Simple, Data::Schema, Terminal::Rich. Not under a vendor prefix.

A distribution whose product is a command takes the ecosystem's App:: namespace — App::Rakus installs rakus, the way App::Mi6 installs mi6 and App::Rak installs rak. The command itself keeps the short name. Nothing has to be declared for it: a script in bin/ is discovered and installed by zef on its own.

RakuPP:: is reserved for the narrow case where the coupling to the engine is real and a portable module could not express the same thing: variadic C calls, driving --exe, the precompiled-AST cache, the WebAssembly surface. The test is would this module mean anything under Rakudo? If yes, it gets a functional name, and any Raku++-only behaviour in it is an engine bug to go and fix.

Modules that already exist in the ecosystem are not reimplemented here. See the reasoning — in short, the existing modules are the best test oracle Raku++ has, and replacing them would hide the bugs they find.

Testing a distribution on both engines

./test.sh                  # every distribution, both engines
./test.sh HTTP-Simple      # just one

Or by hand, from a distribution directory:

zef install --deps-only .
raku   -Ilib t/01-response.t
rakupp -Ilib t/01-response.t

If the two engines are built for different architectures

A dependency with a native library records one absolute path at build time (OpenSSL writes it into resources/libraries.json), and both engines share one installation repository — so an x86_64 Rakudo and an arm64 Raku++ on the same Mac cannot both load it. Build a universal library once and point the install at it:

lipo -create /usr/local/opt/openssl@3/lib/libssl.3.dylib /opt/homebrew/opt/openssl@3/lib/libssl.3.dylib -output ~/.local/openssl-universal/lib/libssl.dylib

Do the same for libcrypto, then install with OPENSSL_PREFIX=~/.local/openssl-universal. Each slice keeps its own load paths, so both engines get a library of their own architecture from one file. CI is single-architecture and needs none of this.

Both engines are expected to pass before anything is released. CI does the same for every distribution in the repository, on every push — against the released Raku++ binary, so a module that depends on an unreleased engine fix will fail there until the next Raku++ release.

Releasing

Each distribution is released independently, from its own directory:

cd HTTP-Simple
fez upload

META6.json carries source-url and support.source pointing at the distribution's own directory here (.../raku-modules/tree/main/<Dist>), not at the repository root, so raku.land lands a reader on the module rather than on the whole collection.

Clear .precomp/ and sdist/ first, every time. Both are gitignored, so git status says the directory is clean while they are sitting there — and fez tars the whole directory regardless of the manifest it just printed. The .precomp trees are the harmful half: they hold .lock files that Rakudo creates and removes as it goes, and a file that changes size while tar reads it produces a corrupt archive. What comes back is not a permissions error but

=<< FATAL: Something went wrong: Error extracting archive:
            tar: Skipping to next header
            ...
            Do you need to run 'fez login' again?

which sends you to re-authenticate over a problem that has nothing to do with login. Running the test suite is what creates .precomp, so the order is: test, clean, upload.

cd <Dist> && rm -rf sdist $(find . -name .precomp -type d) && fez upload

Measured on Prompt::Hidden 0.0.1: 184K over 46 entries and damaged, against 16K over 16 and clean.

Licence

Artistic-2.0, the ecosystem's convention. See LICENSE.

About

Raku modules developed on Raku++ and tested on both engines — one repository, one distribution per directory

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages