Eskiueskiu v0.7.0
Case study

A real cryptographic pipeline in Eskiu

The INE credential-QR decoder, a multi-round AES-256 + RSA-8192 pipeline with QR image extraction, reimplemented in Eskiu and served as an HTTP API, on a stack built entirely from the standard library. 2.5× faster than the reference C, bit-identical to five other implementations.

The workload

Mexico's INE voter credential carries two QR codes that pack 18 biographical fields plus the credential photo behind a seven-layer cryptographic pipeline: multiple rounds of AES-256-CBC keyed off values derived at runtime, RSA-8192 block decryption, a base64 stage, and a 6-bit text unpacker. Decoding one starts from a photo of the card: detect and read the two QR payloads, then run the whole pipeline to recover the fields and rebuild the photo. It is a compact but unforgiving mix of image handling, real cryptography, and byte-exact bit manipulation, exactly the kind of code that is normally C's and nobody else's.

Why Eskiu fit

Bit-identical across the stack

The decoder exists in six implementations, kept in lockstep so a change to the algorithm is caught everywhere: pure C and Python, WebAssembly (in the browser), an Android AAR, an iOS XCFramework, and the Eskiu path. All six produce byte-for-byte identical output from the same credential. The Eskiu implementation is a full peer in that set, not a toy port, and its crypto pipeline runs 2.5× faster than the reference C it was measured against.

Dogfooding made the language better

Moving the decoder onto the current compiler was itself a test of the language. The crypto code is dense with acquire-then-release patterns, so defer / errdefer collapsed roughly fifteen manual cleanup calls, and eight error-path cleanup cascades, into a single line each, making a whole class of buffer leak impossible (verified leak-free under AddressSanitizer). A --safe build adds bounds checks for parsing untrusted images.

More telling: exercising real code surfaced two concrete improvements that shipped straight back into the compiler in v0.6.1. Slicing a raw heap pointer (ptr[lo..hi]) had crashed code generation; it now builds a proper slice, so heap buffers, not just fixed arrays, can be sliced. And a \xNN hex escape was added to string and character literals for byte-precise data. The decoder needed both; the language grew to meet it.

So the same language that boots a bare-metal ARM64 kernel, and drops a memory-tight module into a C++ rendering engine (see the ReactVision case study), also decodes a real cryptographic format at native speed and serves it over HTTP. One language across the stack, used where it pays.