Releasing v0.1.1 — Codegen Fixes and FFI Linking

· 2 min read
v0.1.1

One day after v0.1.0 and we’re already patching. This is the release that exists because the first one worked well enough to reveal the next layer of problems.

Changes

Fixed all C++ compiler warnings in codegen. A wall of warnings trains you to stop reading compiler output, and that’s where actual bugs hide. There were a lot of them — unused variables, implicit conversions, signed/unsigned comparisons. None caused bugs, but I wanted to be able to trust a clean build again.

Added --link-lib flag and auto-linking for FFI static libraries in hew test. If your tests touched FFI code, you had to manually pass linker flags — which meant most people’s first experience with FFI was a cryptic linker error. Now hew test discovers static libraries from your project’s FFI dependencies and links them automatically. The --link-lib flag is there for when the auto-discovery guesses wrong.

Eliminated silent type guessing in collection codegen. The codegen had been quietly inferring element types for collections when the type checker didn’t provide them — filling in i64 or string based on heuristics. This worked until it didn’t, and when it didn’t, the error messages were incomprehensible because the programmer never chose those types. Now it’s explicit or it’s an error.

Fixed release build failures on macOS and Linux aarch64. The macOS build was picking up the wrong LLVM dylib path. The aarch64 cross-compilation was missing a sysroot header. Both were environment issues that only showed up in CI, which is the worst kind.

Rewrote the builtin len implementation. The old version dispatched through a match on runtime type tags, but the new version resolves at compile time for known collection types — Vec, String, Map — and only falls back to the runtime dispatch for dynamic types.