eskiuv0.17.0
Documentation

Changelog

All notable changes to Eskiu are documented in this file.

The format is based on Keep a Changelog, and the project follows the compatibility rules in docs/lang/stability.md.


[0.17.0] - 2026-11-26

Details

Added

  • --dev, the profile to develop with: every --safe check and the -Wall lints, at the default -O0 (an explicit --safe=LIST or -O<n> still applies). In a package, eskiuc build --dev, eskiuc test --dev and eskiuc run --dev [-- ARGS] use it. Both compilers.

  • eskiuc COMMAND --help (or -h) prints the usage of every command (new, add, build, run, test, fetch, fmt, repl, doctor) and does nothing else. fmt --help opened a file named --help, new --help created a package by that name, and build --help and test --help needed an eskiu.toml.

  • --time prints the wall time of each compile phase, the link and the total on stderr, as ESKIU_TIME_PHASES=1 did (which still works), now with the link and the total.

  • An object cache, on by default (--no-cache, ESKIU_NO_CACHE=1 or ESKIU_CACHE=0 turn it off): a compile that writes an executable or object file reuses the object of an earlier compile with the same sources (every imported file, the standard library and packages included), compiler, target and flags, so only parsing and the link run again; the warnings are printed again. A program in a package (a directory with an eskiu.toml) keeps its objects in the package's .eskiu-cache directory, which ignores itself in git; any other file uses the platform's cache directory (~/Library/Caches/eskiu on macOS, ~/.cache/eskiu on Linux, %LOCALAPPDATA%\eskiu\cache on Windows); ESKIU_CACHE_DIR overrides both. At most 1 GiB per directory (ESKIU_CACHE_SIZE), least recently used out first. --time shows hits and misses (docs/dev/compile-speed.md).

  • eskiuc test runs several tests at a time (-j N, default half the cores), selects tests by name (eskiuc test inv 'combat_*'), kills a test that runs past --timeout (default 60 s), and prints one JSON object per test with --json. A test ends as pass, fail, build-failed, timeout or crashed (by a signal); its output goes to build/tests/NAME.log and is shown when it fails. Exit code 0 when all pass, 1 when one does not, 2 for a wrong command line.

Changed

  • A redefinition (struct, union, enum, function, global, type alias, interface, extern) is followed by a note at the earlier declaration, note: FILE:LINE:COL: 'Event' is first defined here, which names the module when that file is a stdlib module's ((in <json>)) or a dependency's ((in package 'ui')); in --diagnostics=json it is a note of the error. The errors that only follow from the clash (a member, an argument count or a struct literal written for the other declaration, a method on its result) are no longer reported, and a second function body with another signature is one error, not two. Both compilers.

  • A syntax error at text a macro produced is followed by a note that names the macro, its module and definition, and what it expanded to: const int CLOCK_MONO = 3; after import <time>; gave only Expected declaration, got INT_LIT; now note: ... 'CLOCK_MONO' is a macro (from <time>, defined at .../time.esk:53) and expands to '6' here; rename yours or #undef it. Both compilers.

  • A failed --safe check prints one line to stderr with the file, line and column of the operation and what went wrong (main.esk:12:20: index 7 out of bounds for length 4, integer overflow in '+', null pointer dereference, slice [2..9] out of bounds for length 5), flushes stdout and aborts. It used to trap with no message (SIGTRAP); the program now ends with SIGABRT (exit status 134 in a POSIX shell, 3 on Windows). A --freestanding build still traps without a message. The check itself is unchanged (a compare and a branch); the report is one shared function per object file. Both compilers print the same report.

  • Under --safe, slicing a raw pointer or a string (p[lo..hi]) checks the pointer for null in the self-hosted compiler too, as eskiuc did.
  • Editors: the VS Code extension and the language server (Neovim, Helix, Zed, the IntelliJ plugin) share one implementation (editor/vscode/project.js and features.js), so they find the same program, report the same diagnostics and give the same answers. The server takes the extension's settings (compilerPath, compilerFlags, entryPoint, checkOnType, checkDelay) in initializationOptions or workspace/didChangeConfiguration, waits checkDelay after an edit like the extension, and reports why a rename is refused. The IntelliJ plugin has settings for the entry point, checking while typing and the delay.
  • Editors: find references and rename cover every file of the program, from the declaring file or from any file that uses the symbol; a symbol declared outside the program's files (the stdlib, a package) is not renamed.
  • Editors: saving a file checks the other open files again (what it declares changes what they see). Columns after non-ASCII text are right (the compiler counts bytes, editors UTF-16 units).
  • A wrong command line exits with code 2 in every command, with one message format: error: unknown option '--x' (see 'eskiuc --help'), or error: CMD: ... for a command. An unknown compiler option, a bad option value (-O9, --safe=nope) and a missing input exited with 1. A failed compile, link or test is still 1 (docs/lang/build.md, "Exit codes"). The self-hosted driver does the same.

Fixed

  • A keyword used as a name (in, fn, match, a type name) is reported as expected a name, found keyword 'in' in every position: a for-in loop variable (for (in in xs)) and a lambda's parameter now say so too in both compilers, and the self-hosted compiler no longer says Expected parameter name, Expected struct name or Expected enum member name there; it also puts In struct 'S': before an error in a struct member, as the C++ compiler does.

  • <args>: an option registered without dashes (ArgParser_option_int(&p, "w", "width", ...)) was never matched, silently. A name without dashes now means the same as with them: a one-letter one is the short option (-w), a longer one the long option (--width).

  • A record or array over 16 bytes is copied in memory (memmove, memset or memcpy from a constant), never loaded and stored as one value. An assignment such as *self = State{} of a record holding arrays of records made LLVM build thousands of insertvalues and its instruction selection then took a minute at -O2 for one file of a game (67.5 s to 2.4 s). Programs behave the same.

  • Editors check a file in its program: the root is the entryPoint setting, else the main of the nearest eskiu.toml, else the top of the file's importers, when it reaches the file through import "...". A file that used a function declared in a file imported earlier by the program, not by itself, was checked from a sibling that imports it and showed a false "undefined function". Unsaved text is passed with --overlay, also for a file imported indirectly, and only the file's own diagnostics are shown; a syntax error in another file that stops the program is shown as a note instead of a clean file.
  • --definition-at, --references-at and rename: a local with the name of a function or a global no longer takes the global's place (the function's declaration found nothing and its calls resolved to the local, so a rename changed the local). Both compilers.

Removed

  • The browser playground: the site's playground page, the home page's link to it and the playground/ service. Running native code sent by anyone needed a sandboxed server of its own; the quickstart installs the compiler in a minute instead, and agents run code through the MCP's eskiu_run.

[0.16.3]

Details

Security

  • <eventloop> on Windows and WebAssembly grows its poll set as descriptors are registered. It was a fixed table of 4096 (Windows) or 1024 (WebAssembly) entries, and a registration past its end wrote out of bounds.

  • fetch_last_error() keeps one message per thread. Every failed fetch wrote one global buffer, so two threads failing at once could corrupt the heap.

  • The HTTP/1.1 servers and http_recv answer 400 to a head over HTTP_SERVE_MAX_HEAD (64 KiB) however it is split into reads. The limit was checked only while the end of the head was still missing, so a longer head could get through.

  • fs_temp_file and fs_temp_dir reject a prefix with a / or \ (EINVAL). The prefix was joined to the temporary directory as given, so "../x-" created the file or directory outside it.

  • The preprocessor stops a file whose macros expand to more than 16 MiB of replacement text with an error. A duplicating macro nested a few dozen times took time and memory exponential in its size. Both compilers.

  • Lowering a generic async function no longer builds and sorts the list of all 2^n subsets of its n type parameters to write an awaited type in terms of them (out of memory from about 28 parameters, undefined from 32). The subsets are walked in the same order, at most 65536 of them. Both compilers.

  • eskiu.toml rejects a control character (tab, newline, ...) in a dependency's git, rev or path, and eskiu.lock is never written with one. A tab or newline in a path dependency's name went into the tab- and newline-separated lock as is and could add or replace an entry for another package.

  • A web build copies a package's [web] assets only from inside the package: an asset that is a symbolic link, or lies under one, is skipped with a warning, and so is a symbolic link inside an asset directory. A dependency could list a link to any file the user can read and have it copied into the published output. The self-hosted driver also rejects an asset spelled with .. or as an absolute path, as eskiu.toml does. Both compilers.

  • A [native.NAME] archive whose lib directory is a symbolic link, or holds one that leads out of the archive, is refused, when it is unpacked and when a build uses the cached copy. The SHA-256 check covers the archive's bytes, not what a link in it reaches, so such an archive made the build link from (and on macOS rewrite and re-sign libraries in) a directory outside it. The self-hosted driver no longer follows a link when it rewrites a .dylib. Both compilers.

  • The playground runs a program's output through a cap as it is read, kills the program's whole process tree when it ends or times out (and any process that left it), and runs nothing unless its container has no network (--network none, the API on a Unix socket; see playground/README.md). Output was buffered whole before the cap, a forked process outlived its request, and programs could reach the network.

  • The VS Code extension honors Workspace Trust: in a workspace you have not trusted it ignores the workspace's eskiu.compilerPath, eskiu.compilerFlags and eskiu.entryPoint and does not run a build/eskiuc from it. The standalone language server searches the workspace for a compiler only when its client says it is trusted, and the IntelliJ plugin only for trusted projects. Opening a repository could run a program it shipped.

  • CI: every workflow's token is read-only except the job that creates the release, actions are pinned by commit, and each marketplace token reaches only the step that publishes with it.

[0.16.2]

Details

Changed

  • A struct, union or array parameter over 16 bytes passes between Eskiu functions as a pointer to a copy the caller makes, on every target and every call path (direct, method, generic, interface, function value, closure, async). By-value semantics are unchanged. LLVM no longer spreads such a record into one argument per field at each call, so a call that takes a large struct literal is much smaller: a Row(Style{padding: 8}) {} element of the ui package costs about 105 bytes of WebAssembly instead of 468. A struct literal starts as a copy of its type's constant default value and stores only the fields it gives. Extern C functions, export entries and C callbacks keep the C ABI. Both compilers. Objects built by 0.16.1 do not link with ones built by 0.16.2: rebuild everything.

  • Warnings are reported in every file of the program's own, not only in the root file: a file imported from under the program's directory (the nearest one above the root file with an eskiu.toml, else the root file's) is linted like the root file. The standard library and dependencies are still libraries and are not linted. A package's modules imported from its main.esk, and a ui app's sources (which the ui tool's generated entry imports), now get -Wformat, -Wdeprecated and the -Wall checks. Both compilers.

Fixed

  • The self-hosted compiler names the location in "cannot assign to read-only location 'b'", as eskiuc does.
  • -Wall no longer reports a variadic function's ... as an unused parameter. Both compilers.

[0.16.1]

Details

Added

  • *T const and const *T const, the star-first spellings of a const pointer (T* const, const T* const): the same type, in both compilers. The docs and the Book write pointers star first throughout (*T, const *T, *T const), and the spec says how to make a device's registers volatile without volatile fields.
  • -Wformat checks the calls of a printf-style function the program declares: a variadic function or extern whose last fixed parameter is string fmt (such as ui's textf), as it checks printf's. Both compilers.

Fixed

  • WebAssembly: a program that throws or catches links with newer emsdks, which no longer link in C++ mode by default when the driver is emcc (__cxa_begin_catch and __cxa_end_catch were undefined): eskiuc passes -sDEFAULT_TO_CXX=1 with exceptions. Both compilers.
  • A --target build for WebAssembly (emscripten), Android, iOS or visionOS whose toolchain is missing says so (emcc was not found: install Emscripten ...) instead of falling back to the host's cc and its "unrecognized option" errors.
  • <fetch>: HTTPS loads OpenSSL 4 (libssl-4-x64.dll, libssl.so.4, libssl.4.dylib and Homebrew's openssl@4) when OpenSSL 3 is not there. MSYS2 ships OpenSSL 4.1, so on Windows an https:// request failed with FETCH_ERR_NO_TLS.
  • Self-hosted compiler: a member access through a const pointer (P* const q, then q.v) emitted invalid IR, and reassigning a local int* const was not an error.

[0.16.0]

Details

Added

  • visionOS targets: --target arm64-apple-xros1.0 (and -simulator) links through xcrun -sdk xros / xrsimulator with no $CC, and predefines TARGET_OS_IPHONE and TARGET_OS_VISION, in both compilers (docs/dev/cross-compile.md).

  • Editors: go to definition, find references, rename and hover work on a type name wherever a type is written (parameter, return, local and field types, *T, ?*T, T[], T[N], generic arguments, casts, sizeof(T), struct literals, constraints, alias targets) and at the type's declaration, for structs, unions, enums, interfaces and aliases. Hover shows the declaration (struct Point). Both compilers.

  • <fetch>: FetchOptions.body_sent, when set, points at a counter the request stores the body's bytes sent so far in as they go, for upload progress (a recording to a server, a large POST).

Changed

  • The compiler's sources (C++ and the self-hosted compiler) are split into files of about 600 lines by topic, and the stdlib's larger modules keep their parts in private directories (stdlib/_fetch/, stdlib/_json/, ...) that tools skip. No behavior change.

Fixed

  • Editors (VS Code, IntelliJ, any LSP client): a file that is a part of a module (import "part.esk";) is checked in its module, so it sees the types and names the module declares before it. Diagnostics, hover, go to definition, references, completion and signature help work in parts, also nested ones and parts in other directories (editor/vscode/flatten.js).

[0.15.1]

Details

Added

  • install.sh --with-ui (ESKIU_WITH_UI=1 for install.ps1) also installs the ui tool from eskiu-packages/ui's release, checked against its SHA256SUMS; install.ps1 keeps ui.exe across an update of eskiuc.
  • The site has a page for coding agents (agents.html: install, --diagnostics=json, ui agent web --json, ui test, the ghcr.io/eskiu-lang/agent image and the MCP server) and an llms.txt.
  • ESKIU_SYSTEM_LIBS=SDL3,... links the system's copy of a library a package ships in [native.NAME] instead of downloading the archive (* names every one). The build looks for libNAME in LIBRARY_PATH, pkg-config's directory for it and the usual library directories. A build for this machine whose download fails (offline) links the system's library when there is one, with a warning, instead of stopping. Both compilers.
  • A package can list files a web build needs next to its page: [web] assets = ["web/gpu-naga.wasm"] in its eskiu.toml. A wasm32-unknown-emscripten build in that package, or in one that depends on it, copies them into the output's directory. Older compilers reject the table, so a package that adds it needs 0.15.1. eskiu.toml arrays of strings may span lines.
  • eskiuc build FILE.esk builds that file of the package (an example, a tool) with the package's dependencies, to build/FILE, in place of the package's main.

Changed

  • eskiuc doctor reports SDL3 the way a build gets it: the [native.SDL3] archive of a package (the current one or one already fetched), cached or still to download, else the system's libSDL3, with what to do when there is neither. It used to look for SDL3's C headers, which no build uses.
  • The LLVM code generator marks scalar parameters and results of Eskiu functions noundef, and a function nounwind when nothing it does can throw. Code at -O2 is unchanged on the test corpus; -O0 objects are about 4% smaller.

Fixed

  • Compiling a file of a package directly (eskiuc src/main.esk, what ui runs) used eskiu.lock as it was after a dependency was edited in eskiu.toml (switched from git to a local path, or to another rev), so the old source was built until eskiuc fetch. It now resolves the dependencies again when the lock does not match the manifest, as eskiuc build does.
  • A program of several input files failed to parse when an import of a later file used a type or a generic that an earlier file's imports declared: eskiuc a.esk b.esk reported Expected ';' at return Ok<GpuSurface, string>(s);. What eskiuc build file.esk ran before (the package's main and the file, as one program) hit it in the gpu package.
  • A generic function instantiated while compiling another function saw that function's locals, so List_push or List_free failed to compile in a function with a local named free ("Call target is not a function", with no location). Errors at a call in the code generator now give the file, line and column, and say when a variable hides a function.
  • --target for the other macOS architecture on a Mac (x86_64-apple-macosx11.0 from Apple silicon, or arm64 from an Intel Mac) linked the object as the host's architecture and failed; the driver now links it with cc -target (or $CC -target when CC is set and does not select a target itself).
  • An output in a directory that did not exist yet (-o build/app.html, -c -o, --emit-header) failed in the C driver, emcc or the file write; the compiler now creates that directory first, in both compilers.

[0.15.0]

Details

Added

  • --diagnostics=json prints errors and warnings on stderr as JSON lines, one object per diagnostic: severity, a stable id per kind (undefined-variable), message, file, line, column, the range of the token there, the warning's flag and "did you mean" hints as their own fields, and the notes that go with it. It carries the same diagnostics as the text form, which stays the default. Both compilers print the same JSON; the format and the id list are in docs/dev/diagnostics.md.
  • src_file(), src_line() and src_col() as a parameter's default value give the position of each call that leaves the argument out, so a library can record where it is called from (void Text(string s, int line = src_line())). Each is a constant at the call, with no cost in code that does not use them.
  • HttpLimits.max_body sets the largest request body the HTTP/1.1 and HTTP/2 servers accept (default HTTP_SERVE_MAX_BODY, 1 MiB; a body past it is answered 413), so a server taking uploads no longer needs its own copy of the stdlib.
  • A shared library (.so, .dylib, .dll) with export functions now offers only those: the rest of the program and the standard library it uses are hidden, with no linker version script or .def file.
  • log_set_rotation(max_bytes, keep) in <log> rotates the log file by size, keeping keep old files (app.log.1 the newest).
  • export before a function definition makes it a C entry point: C, Rust or any language that calls C calls it by its name with the target's C calling convention, structs and unions by value included, while Eskiu code calls it as before. --emit-header FILE writes the C declarations of a program's exported functions and of the types they reach (records with their bitfields and packing), so eskiuc lib.esk -o liblib.a and eskiuc lib.esk --emit-header lib.h give C a library and its header. Both compilers, every back end (LLVM, and the EIR C and ARM64 ones).
  • Prebuilt binaries for Intel Macs (eskiuc-macos-x86_64.tar.gz), which install.sh picks on an x86_64 Mac.
  • On Windows, install.ps1 also installs llvm-mingw (checked against a pinned SHA-256) into the install's toolchain folder when no C driver is on PATH, so programs link with no separate toolchain install (ESKIU_TOOLCHAIN=1 forces it, 0 skips it). eskiuc finds a toolchain there when none is on PATH, and with llvm-mingw it links exceptions against libc++ instead of libstdc++.
  • eskiuc doctor lists what the machine has for each kind of build (the C driver, git, curl, tar, OpenSSL, SDL3, Emscripten, the Android NDK, the iOS SDK, devkitARM) and what to install for what is missing.
  • -ffp-contract=fast lets the compiler fuse a multiply and an add into one fused multiply-add (rounded once); without it each floating-point operation rounds, so results stay the same on every target. Both compilers.
  • -fstrict-aliasing gives the optimizer C's aliasing rule (scalar type-based alias information): a store of one scalar type is assumed not to change a value of another. Unions, bytes and a variable read through a pointer cast keep aliasing everything. Off by default; both compilers.
  • eskiuc fmt --width N also breaks code lines longer than N after the commas of their outermost bracketed list; without it the formatter's output does not change.
  • <json>: json_parse_doc(src) parses into a JsonDoc whose nodes and strings live in one arena, about three times faster than json_parse plus JsonValue_free; the document is read-only and JsonDoc_free frees it.
  • The self-hosted compiler links a package's [native.NAME] libraries, fetching and checking them as the C++ compiler does.
  • The self-hosted compiler has the EIR backends: eskiuc-esk --emit-c and --emit-asm write the same C and ARM64 assembly as eskiuc, and eskiuc-esk --backend=eir builds programs through them (assembly on arm64 outside Windows, C with any $CC elsewhere), without clang or LLVM.
  • --backend=eir at -O0 on arm64 assembles its output itself: an integrated ARM64 assembler writes the Mach-O or ELF object, with no external assembler (LangArena's 50 benchmarks build in 2.0 s instead of 4.6 s). ESKIU_EIR_EXTERNAL_AS=1 uses the system C driver instead.
  • --emit-asm rejects the options its assembly cannot honor (-O1 and up, --safe, --mcpu, ...), as --backend=eir does on that path; they were ignored.
  • tests/index.sh prints the test catalog from each test's first comment, and run.sh fails on a test without one.

Changed

  • The compiler is faster: the ui kit gallery's -O0 object (about 47,000 lines of IR, nearly all of it the ui library and the stdlib) builds in 0.29 s instead of 0.47 s, and type-checks in 0.06 s instead of 0.19 s. The parser no longer throws an exception to back out of a statement it first tried as a declaration or of a comparison it first tried as a generic call, a program without async is type-checked once instead of twice, and AST node kinds are compared instead of dynamic_cast. A compiler built with the plain cmake -S . -B build is now a Release build (it was unoptimized, and three times slower). ESKIU_TIME_PHASES=1 prints the time of each phase; docs/dev/compile-speed.md has the breakdown and how to profile.
  • <regex> searches with a lazily built DFA for where the match ends and one over the reversed pattern for where it starts, and finds the groups over the match only, with a bounded backtracker (the Pike VM when the match is long): two to three times faster on log-like text and about 12% faster on short, dense matches with groups (a {{(.*?)}} template), with the same results (checked against the Pike VM alone by a test and the regex fuzz target). A pattern with an assertion that can repeat in a loop without consuming ((?:^|a)*) runs on the Pike VM alone.
  • TLS (<tls> servers and <fetch>'s HTTPS client) asks for TLS 1.2 or newer and turns off compression and renegotiation, whatever the OpenSSL defaults; a server whose key does not match its certificate is refused when the context is made. The client loads OpenSSL and makes its shared contexts once, also from several threads at once.
  • The kernel demo's heap is a first-fit allocator, so free gives memory back.
  • --backend=eir takes -O on every target: at -O1 and up it writes C and compiles it at that level (always with -fno-strict-aliasing), arm64 included, and only an -O0 build on arm64 goes through the ARM64 assembly, which has no levels. Every run test on the C list behaves the same at -O2 (EIR_OPT=2 tests/eir/check.sh, in CI on Linux).
  • Building against an LLVM without RTTI (the llvm-project release tarballs) stops at configure time with an explanation instead of failing to link. LLVM's headers are included as system headers, and the compiler's own sources build without warnings (CI builds with -DESKIU_WERROR=ON).
  • fetch_basic and fetch_async use numeric addresses only; the host name cases moved to fetch_dns, which ESKIU_RESOLVER_TESTS=0 skips with dns_connect.
  • CI runs the Windows build on pull requests and on main, the EIR C backend on Linux, and fails when the editor modes exceed their time budget; a release fails when its Windows build does.

Fixed

  • The playground's rate limit trusts X-Forwarded-For only from the proxies in TRUSTED_PROXIES and takes the first untrusted hop from the right, so a client cannot reset its limit with a forged header (pull request #1, from MarioACo).
  • Windows paths: an import of C:/... or C:\... is absolute (it was joined to the importing file's directory), and a file path written with backslashes keeps its directory for its relative imports. Both compilers.
  • A ?: with a null arm inside a generic function (key == null ? null : copy(key)) no longer fails with an invalid phi: the literal is a pointer even where the checker records no type for it.
  • The EIR builders (C++ and self-hosted) treated a prototype as an extern until its definition was built: a call written before the definition passed a closure argument as a C function pointer (the C++ compiler rejected the program, the self-hosted one built a binary that crashed), which broke building the self-hosted compiler through EIR. A prototype of a function the program defines is now an ordinary function.
  • The self-hosted EIR builder printed its errors and went on, exiting 0; it now stops with status 1 as the C++ one does.
  • A thread started under the EIR backends kept 8 bytes until it was joined (a thread that detaches itself leaked them): the handle is now the pthread_t itself, as with LLVM.
  • <fetch>'s host lookup thread detaches itself instead of detaching through the handle thread_create returns, which is opaque (a crash with the EIR backends on Linux).
  • The kernel demo's allocator masks IRQs around its free list: a preempted task could corrupt it.

[0.14.1]

Details

Added

  • Native EIR backends that skip LLVM's code generator: --emit-asm (ARM64), --emit-c (C99), --emit-obj, and --backend=eir, which builds through the normal driver (#pragma link, implied libraries, -c, .a, eskiuc run). Exceptions, threads and exception_text run on a small C runtime. Options that only change LLVM's output (-O, --safe, --freestanding, ...) are errors under it. See docs/dev/eir-backends.md.
  • tests/eir/check.sh runs the run tests through a backend (as tests/run.sh does, C companions included) and fails when a test that passed stops passing; CI runs it on macOS.
  • The self-hosted compiler's --test-eir is a port of the C++ EIR builder and prints the same text for every run test; tests/selfhost/eir_parity.sh gates it in CI.
  • The EIR backends pass structs and unions by value to and from C functions and hand C a function taking or returning one (or a va_list) through a thunk with the C signature.
  • <csv>: CsvReader reads a CSV one row at a time with no String per field (CsvReader_init, CsvReader_next, CsvReader_field, ...): each row's fields are NUL-terminated in a buffer the reader reuses. csv_parse is now built on it, so both read every input the same way (checked against the previous csv_parse over 300000 random inputs). Summing three columns of a 100000-row CSV takes half the time it does through csv_parse.
  • String_append_bytes(s, p, n) (s.append_bytes(p, n)) appends n bytes from a pointer, NULs included; it was only available as an internal function.
  • <regex>: Regex_search_at(&re, text, len, start, &m) searches len bytes from offset start, and Regex_iter / RegexIter_next go through every match as Go's FindAll does (after an empty match the search moves on one code point).

Fixed

  • A field of a packed struct (packed, #pragma pack(N), or a struct inside one) was read and written with its type's alignment although its address may not have it, which LLVM may turn into wider or paired accesses (and which traps on 32-bit ARM). Each such access now carries the alignment its address is known to have (1 under packed, at most N under pack(N)), in both compilers.
  • -O2 and -O3 now run LLVM's loop and SLP vectorizers, as clang does; the pipeline had them off. CLBG n-body runs in about half the time.
  • A C math extern with the C signature (double sqrt(double), float powf(float, float), ...) is declared as reading and writing no memory, so the optimizer can hoist, merge and inline it (sqrt becomes an instruction): fabs/floor/fmin/... on every target, the functions that may set errno only on Darwin, where clang defaults to -fno-math-errno and libm never sets it. Not under --freestanding.
  • <json>: JsonValue_push walked the whole array on each call, so building an array of n elements took O(n^2) time (80000 elements: 4.3 s, now under 0.1 s). JsonValue_len and a loop over JsonValue_at(v, i) are linear too.
  • <json> stringifies numbers with its own shortest round-trip algorithm (Ryu) instead of printf and strtod, and copies plain strings in place: building and stringifying a document is about 2.5 times faster (LangArena Json::Generate 2.2 s to 0.9 s). The text is byte for byte the same as before (checked over 82 million values).
  • json_parse reads a number of up to 15 significant digits with a decimal exponent within 10^±22 straight from the text with one exact multiplication or division (the double strtod gives), and the rest with strtod in place, instead of copying each number into a String for atof; plain runs inside strings are copied at once. Parsing a document of numbers is about 1.4 times faster.
  • <map>: Map<V> keeps each key's hash, so a lookup compares hashes before strings and a removal or a growth no longer rehashes the keys it moves; lookups and removals are up to twice as fast. The iteration order is unchanged.
  • <base64> encodes about 3.6 times and decodes about 4.7 times faster (500 KB buffers: encode 1.53 s to 0.42 s, decode 1.50 s to 0.32 s, ahead of Go's encoding/base64). Each character is looked up in tables that give its bits already in place, and word-aligned buffers are read and written a word at a time. Results and errors are the same as before for every input.
  • EIR: a cast between float and double, or between a pointer and an integer, now emits its conversion; a closure call converts its arguments to the parameter types; a top-level function used as a closure goes through a __fnptr_ thunk; an extern's function parameter receives a C function pointer; continue inside a switch no longer crashes the compiler; a repeated prototype no longer defines the function twice.
  • --test-eir output is deterministic: records are laid out in declaration order and as the program first names them (no longer every generic instance the checker saw, in hash order), and a vtable global prints its functions instead of an uninitialized operand. The async lowering names its temporaries in the same order whichever C++ compiler built eskiuc.
  • EVM: integer / and % by zero stop the program instead of yielding 0, and ptrtoint, inttoptr, fptrunc and fpext are executed.
  • EIR integers follow C everywhere: the builder makes the promotions and usual arithmetic conversions explicit and every backend holds a value normalized to its type; constant expressions fold with the type checker's rules.
  • EIR lowering now covers alloc_with, struct and union layout as C lays it out (bitfields, unnamed bitfields, #pragma pack), generic enum instances, field defaults, for-in, labeled break/continue, defer scoping, errdefer on ?, dbg, operators and locals inside generic instances, and evaluates an assignment's target once and first.
  • <regex> had no way to search from an offset: searching text + off ran strlen on every call, so finding all matches was quadratic, and it lost the text before the cut, so ^, \b and \B were wrong there. Regex_search_at keeps that text as context and reports offsets into the whole text.
  • <regex> searches are much faster: the search skips text where no match can start (by the bytes a match can begin with, and by a byte every match must contain), its scratch memory is allocated once per compiled regex instead of on every call (a search running while another thread holds it allocates its own, so a Regex can still be searched from several threads at once), and threads that cannot read the next byte are dropped. A log-scanning benchmark went from 25.2 s to 1.8 s and a template one from 7.4 s to 3.1 s.

[0.14.0]

Details

Added

  • catch (_) catches any exception without binding a variable; it is the last catch of a try. exception_text(), inside any catch, describes what was caught as the uncaught-exception report does (int 7, string "boom"). The text belongs to its catch block, also across an await in an async function, and a function of the program's own named exception_text hides the builtin.
  • [native.NAME] packages for iOS (ios-arm64, ios-arm64-simulator, ios-x86_64-simulator) and Android (android-arm64, android-x86_64), and for any --target build: the archive for the target's platform is fetched and linked as for the host.

Fixed

  • --target x86_64-w64-mingw32 passed structs to C functions with the System V convention instead of the Windows x64 one, so a call into a DLL could crash. Every --target is now normalized first (x86_64-w64-windows-gnu).
  • A build for iOS or Android no longer embeds an rpath to this machine's package cache.

[0.13.0]

Details

The first public release. Code that compiles with 0.13.0 keeps compiling in every 0.13.x (stability.md).

The language

  • C syntax and C integer rules: promotions, the usual arithmetic conversions, bool as != 0, element-counting pointer subtraction, sizeof of a type or an expression, octal, hex and binary literals with _ digit separators.
  • Run-time integer behavior is defined at every optimization level: overflow wraps, a shift count is taken modulo the width, a zero divisor traps, MIN / -1 wraps, and float to integer saturates.
  • Structs with methods and dot syntax, field defaults, unions, bitfields and packed structs laid out as the target's C compiler lays them out; enums whose members are constant expressions; type aliases.
  • Generics with inferred type arguments and interface bounds (<T: Ord>), generic structs with inline methods, and dot calls on generic instances (list.push(8)).
  • Trailing blocks: a call statement may end in a block, passed as its last argument, so Column(style) { ... } is Column(style, void() { ... }).
  • Structural interfaces as first-class values, sum types with exhaustive match, closures with escape analysis, operator overloading, labeled break/continue, ?:, do/while, static locals and multidimensional arrays.
  • Default parameter values (void connect(string host, int port = 443), struct literals of constants included: V3 up = V3{0.0, 1.0, 0.0}) and dbg(e), which prints an expression's source and value to stderr and yields the value.
  • deprecated("use X") on functions, and "did you mean" hints on misspelled names.
  • Scripts: a file may have statements at the top level, which run in order as an implicit main with the arguments in argc and argv; its top-level variables are globals the functions can see.

Memory and safety

  • No garbage collector: alloc<T> (zeroed memory) and free, and explicit allocators in <alloc> (bump, arena, pool, first fit) and <sysheap>.
  • defer and errdefer, slices (T[]), checked nullable pointers (?*T) with flow-sensitive narrowing, must_use, const receivers, and an opt-in --safe build that traps on out-of-bounds indexes, signed overflow and null dereferences, each category on its own with --safe=bounds,overflow,null.
  • Locals, alloc_with blocks and sum-type values start at zero.
  • Warnings on by default for common mistakes (string comparison by address, printf formats, the address of a packed member, dangling local addresses, huge locals, an ignored Result, an await while a mutex is locked), with -Wall, -Wextra, -Werror and -w.

Concurrency and errors

  • async/await on any expression and in every control-flow construct, with cancellation, spawn, select2/join2, timers and channels over an event loop.
  • Threads (thread_create/thread_join) and atomics (<atomic>: 32-bit, 64-bit and pointer cells, fetch operations, relaxed forms, fences).
  • try/catch/finally/throw; an uncaught exception prints its type and value.
  • Result, Option and Either with the ? operator. Result with ? is the way to report an expected failure, and ? passes an error up through functions whose Result types differ only in the success type; throw is for unrecoverable errors (spec §6.10).

C interop and targets

  • extern functions and variables, with structs and unions passed and returned by value in the target's C ABI (AArch64, x86-64 SysV and Windows, 32-bit ARM, 32-bit x86, wasm32), callbacks (also ones taking a C va_list), va_list and variadic functions.
  • <ctypes>: size_t, ssize_t and c_long for extern declarations, passed at the target's C width (32 bits on 32-bit targets), so one declaration is right everywhere.
  • Inline assembly with outputs, inputs and clobbers; volatile accesses; intrinsic.
  • #pragma link and implied libraries, so no -lm, -lc++ or -lpthread flags.
  • macOS, Linux and Windows hosts; cross-compilation with --target (including bare-metal none triples and --freestanding); -O0 to -O3.
  • WebAssembly: wasm32-unknown-emscripten (linked by emcc) and WASI. The standard library and async runtime run there (an event loop over poll()), and exceptions work on emscripten through its runtime.
  • Android (aarch64-linux-android24, armv7, x86_64; linked with the NDK's clang) and iOS (devices and the simulator; linked through xcrun).
  • Static (.a, .lib) and shared (.so, .dylib, .dll) library outputs, for apps that link Eskiu code from Xcode, Gradle or emscripten builds.
  • --subsystem=windows links a Windows program that opens its own window without a console.

Standard library

  • Collections (List, Map, HashMap, Set), strings and bytes, math, sorting, random numbers, regex (RE2 syntax over UTF-8), time and calendars, UUIDs.
  • <sort> is libc++'s std::sort, std::partial_sort and std::nth_element (sort<T>, sort_partial<T>, sort_nth<T>), so code ported from C++ orders tied elements the same way; List_reserve, List_resize and List_copy_from in <list>.
  • Files, directories, globbing and temp files (<fs>), child processes (<process>), environment and .env files, DNS, sockets, URLs.
  • JSON, CSV, base64, hashes (SHA-256, SHA-1, MD5, HMAC-SHA256), multipart forms.
  • An HTTP client (<fetch>, with HTTPS through the system OpenSSL), and HTTP/1.1, HTTP/2 and TLS servers, blocking and async.
  • Command-line helpers: argument parsing (<args>), terminal colors (<term>), logging (<log>) and console input.
  • _result forms of the calls that report a status code or null, so ? works with the standard library: fetch_result, fetch_with_result, fs_read_text_result, fs_write_text_result, fs_append_text_result, json_parse_result, process_run_result, sh_result.
  • <libc> declares the common C library for code that wants it directly.

Tools

  • eskiuc run file.esk and #!/usr/bin/env -S eskiuc run shebangs.
  • eskiuc repl, an interactive session over the LLVM JIT (macOS and Linux).
  • A package manager: eskiuc new, add, build, run, test and fetch, with git and path dependencies pinned in eskiu.lock.
  • A package can ship the native libraries it binds: [native.NAME] in eskiu.toml lists a prebuilt archive per platform with its SHA-256, which the first build that links the library downloads and checks into ~/.eskiu/native; the build links against it with no -L.
  • eskiuc fmt: one statement per line, consistent spacing and indentation (type arguments as List<int>), without changing a program's tokens.
  • Editor support for VS Code-based editors and JetBrains IDEs: errors as you type, completion, hover, signature help, go to definition, find references, rename, outline, formatting and quick fixes.

Self-hosting

  • The compiler is also written in Eskiu (selfhost/), built as eskiuc-esk, and checked against the C++ compiler over the whole test corpus and against itself through a three-stage bootstrap. Both compilers give the same diagnostics and warnings.

Known issues

  • eskiuc repl is not available on Windows: the JIT does not register the unwind tables Windows exceptions need. eskiuc run works there.