Skip to content

Sword 0.2.4 — Fold

Choose a tag to compare

@PedroTessaro PedroTessaro released this 21 Oct 19:29
· 280 commits to main since this release
f6181c3

2026-10-21. A patch to Fold for programs that talk to C: C's types by their
C names, and the errno a failing C function leaves behind.

Standard library

  • std/c names C's types the way a header does — c.Int, c.Long,
    c.SizeT, c.SSizeT, c.Double, c.Bool, c.String for a
    const char *, c.Ptr for a void *, and the rest — so a declaration
    copied from a header reads like the original. Each is an alias, so a c.Int
    is an i32 and passes for one. c.Char is u8, for text; a plain char
    passed by value takes c.SChar or c.UChar, since whether it is signed is
    the platform's choice.
  • os.Errno reads the errno a C function just left, and
    os.ClearErrno zeroes it for strtol and its family, which say they
    failed only through errno. errno belongs to the thread, so it is read
    straight after the call, before anything that could wait.

Documentation

  • The Neovim section of the editors' README, with a fix for installing
    swordls under Lua's conventions.

Nothing that compiled before stops compiling.