HTTP::Core — CHANGELOG
Changelog
All notable changes to this project. Format follows Keep a Changelog; this module aims for Semantic Versioning.
Unreleased
Documentation and help, the metadata drift that made them inaccurate, and the two defects that stopped a Windows build from being usable.
Added
README.md### Windows: the PowerShell recipe ($env:CCinstead ofCC=…), which compilers work and what they link against, the.dllnaming convention, and what a successful install prints.Build.rakumodMAIN, soraku -I. Build.rakumod— the command the README documents — actually runs. Previously onlyzef install .reachedBuild.build.docs/API.md— every public method with arguments and defaults, one table per module, plus the exception hierarchy and the environment variables.examples/serve.raku— the full server with a real mainline:--port,--host,--verbose,--demo, and a generated--help. Routes cover path parameters (/users/:id), a wildcard (/files/*), JSON (/health) and a body echo (POST /echo).examples/client.raku— the pooled client as a script:--url,--method,--data,--type,--timeout,--verbose, and--self-test, which starts a server in the same process, issues aGETand aPOST, and exits non-zero on failure. No network required.examples/registry-watch.raku— the connection-registry leak as an executable check: four points, expected versus observed counts,ok/FAILper line.CHANGELOG.md.
Changed
Buildno longer hard-codeszig ccas the default compiler. It trieszig cc,cc,gcc,clangin that order and keeps the first candidate that actually produces the library, because a barezef install .on a machine without zig died inBuildingwhile an installed gcc sat there unused — and because probing with--versionis not enough: WSL inherits the WindowsPATH, so azig.exesitting there answers happily and then fails to build an ELF target.CCstill overrides the search, and an unusableCCnow fails immediately with the command it ran.README.mdrestructured: table of contents, an install section that names the library search order, a quick start, an examples table, a troubleshooting section built from failures that actually occurred, and pointers into the benchmark post-mortems.The test command is now
prove -e 'raku -Ilib' t/*.rakutest, which needs no extra distribution;prove6is mentioned as an alternative for those who have it installed.
Fixed
examples/serve.rakuandexamples/client.rakuonly accepted--option=valuefor the numeric options.MAINbinds a space-separated value only to aStroption, so--port 8080,--demo 3and--timeout 5arrived as stray positional arguments and the scripts printed their usage block instead of running. The numeric options are now declaredStrand validated byint-option/num-option: both spellings work, and a value that is not a number is reported by option name instead of falling through to the usage block.README.mdand both script headers describe the two forms.README.mdcarried the AIGC content label twice; one copy is kept at the top.META6.jsonlisted 18 of the 22 provided modules.HTTP::Core::Bytes,HTTP::Core::Codec::Content,HTTP::Core::Codec::RakuandHTTP::Core::Transport::TLSwere missing.META6.jsonresources namedlibraries/http_wire.so, which is the Windows stem on a Unix platform; the build actually emitslibhttp_wire.soandlibhttp_wire.dylib. Both are now declared with their real names — and, as it turned out, naming files at all was the mistake; see the resource-key fix below.META6.jsonsupport.sourcepointed atraku-http-core, the repository israku-HTTP-Core.META6.jsondid not declareCompress::Zlib, whichHTTP::Core::Codec::Contentloads at the top of the file. Machines that happened to have it installed (zef install .on this one) hid the omission; on a clean onezefstaged the distribution and everyuse HTTP::Coreafterwards died on the missing module.Buildnamed every Unix kernelhttp_wire.dll. The platform test was written asgiven $*DISTRO.is-win { when True { … } default { … } }, andwhen Truein Raku matches any value,Falseincluded, so the Windows branch won on every platform: an ELF or Mach-O image came out with a.dllname, and the binding went looking for a file whose name contradicted its contents. It is anifnow.HTTP::Core::Nativeresolved its library path in aconstantat compile time.zef install .compiles inside a staging repository and deletes it afterwards, soTestingpassed and the very nextuse HTTP::Coredied withCannot locate native library 'http_wire'(error 0x7e) pointing at a directory that no longer existed. Resolution is now deferred to the first call (is native(&_find-lib)), which is also what makeslibrary-path()honest after installation.HTTP::Core::Native._find-libsearched the resource table before the working tree, and matched resource keys by prefix — solibraries/http_wireresolved to thehttp_wire.pdbthatzig ccdrops beside the DLL, and the binding tried to dlopen a debug database. The order is now%*ENV<HTTP_CORE_LIB>→ working tree → resource table → loader, and every candidate is checked against the platform library suffixes.META6.jsonresourceslisted the three build outputs by full name, which cannot describe a distribution built on a fourth platform and did not match what zef stages (resources/<hash>.dll). It now declares the platform-independent keylibraries/http_wire; zef appends the extension.t/14-serialise-threads.rakutestcompared the C fast path against the Raku builder byte for byte,Dateheader included, so a clock tick between the two payloads failed the test roughly once in a hundred runs.Dateis normalised on both sides before the comparison.The
Distribution::Resourcedeprecation notice is now explained rather than left hanging. Every path accessor on a resource object (.absolute,.Str,.IO,.resolve) is deprecated in Rakudo 2026.09 in favour of "using%?RESOURCES<key>directly", which cannot work: the value is a resource object andNativeCallneeds a string. Both would-be replacements were tried and rejected —$?DISTRIBUTION.content('resources/libraries/…')returnsAnyfor an installed distribution, and.openmerely reaches the same deprecatedStrfrom inside. The one call stays,README.mdTroubleshootinggained the reasoning plus how to mute the notice deliberately (RAKUDO_NO_DEPRECATIONS=1, verified on 2026.09) instead of editing code that works.
0.1.0
Added
C kernel (
src/http_wire.c) exported through nine functions and bound with NativeCall, no shim: request head parsing, flat arena out-parameters, request and response writing.HTTP::Corefacade:parse-request,encode-request,parse-response,decode-response,response-extent,core-version,library-path,assert-abi.Codec for all four directions and all four body framings (
no-body,content-length,chunked,until-close), with a string-building oracle (Codec::Raku) the C path is tested against byte for byte.Router with
:paramsand*wildcards, 405 with anAllowheader.HTTP::Core::Server: keep-alive, pipelining, partial-body dispatch,max-head/max-bodylimits, connection accounting.HTTP::Core::Clientwith redirects, per-request deadlines and a connection pool (HTTP::Core::Pool) that reports reuse metrics.Transports: TCP, TLS, and an in-memory transport for tests.
Test suite: 17 files, 101 tests.
Fixed
Connection registry leak:
!dropused aStrkey against anInttransport id, threw inside the frame callback, and so never deregistered; the key was also a recyclable socket address. The registry is now keyed on a monotonicConnection.serial(55c8bae,cc2c5e2,c8d9af9), witht/17-registry-release.rakutestas the regression test andbench/RESULTS-CRO.mdas the write-up.Lost wakeup in the connection pool (
5998387).