Repository navigation
Flecha 0.4.0 release and upgrade notes
Flecha 0.4.0 is the behavior, async-foundation, and language-server release.
It adds signature-only interfaces and typed decoration behaviors, scoped
single-threaded async execution, a bundled flecha-lsp, new encoding, text,
time, and streaming APIs, and the first native installer and package-manager
distribution path. The compiler, Longbow, runtime, standard library, language
server, and editor extension remain one coordinated toolchain release.
Highlights
- Signature-only interfaces support composition, conformance, protected and
default methods, dynamic dispatch, ownership contracts, and variadic calls. - Typed decoration behaviors derive ordinary interface implementations with
compile-time field reflection, requirements, type queries, loop control,
generic constraints, validation, and rollback before publication. - Scoped, single-threaded async execution includes
async main, checked task
creation and joining, generated-frame borrow validation, cancellation and
cleanup, and a versioned compiler/runtime entry ABI. flecha-lspis built and installed with the compiler. The matching VS Code
and Neovim integrations provide diagnostics, hover, definition, references,
completion, rename, and semantic tokens without a separate server download.- The standard library adds strict Base64url and RFC 3986 percent encoding,
signed ZigZag varints, UTF-8 boundary/reverse decoding helpers, IPv4 tails in
IPv6 parsing, bounded whole-stream/delimiter/line reads, and civil UTC plus
strict RFC 3339 conversion. - Managed owning slices gain checked borrowed mutation, owning-slice type
patterns, and stronger recursive cleanup and borrow-origin handling. - Reserved arrays and bulk initialization use a checked optimized path while
retaining fallible growth and strong failure guarantees. - Linux receives a
.deb, Windows receives an unsigned NSIS.exe, and the
release produces checksum-derived Homebrew, WinGet, MSYS2, AUR, and APT
metadata alongside portable archives and fallback installers. Every release
asset also receives GitHub build-provenance attestations.
The complete change list is in the changelog. Public
standard-library declarations are indexed in the
generated API reference.
Supported release targets
The published toolchain is built and clean-installed on:
- Ubuntu 24.04 x86-64 with Clang/LLVM 18;
- Windows Server 2025 x86-64 with MSYS2 UCRT64 Clang/LLVM 23;
- macOS 15 x86-64 with Homebrew Clang/LLVM 18 and Xcode 16.4; and
- macOS 15 arm64 with Homebrew Clang/LLVM 18 and Xcode 16.4.
Native MSVC and the windows-msvc ABI are not supported. Source-build compiler
ranges, linkers, SDKs, and pinned CI packages are documented in the
toolchain matrix.
Installing 0.4.0
Every installation includes flecha, longbow, and flecha-lsp. Downloaded
artifacts must be verified against the release SHA256SUMS.
Windows users can run flecha-0.4.0-windows-x86_64.exe. The v0.4.0 Windows
executables and installer are not Authenticode-signed, so SmartScreen may show
an unrecognized-app warning and managed Windows installations may block them.
Verify the downloaded installer before running it:
gh attestation verify flecha-0.4.0-windows-x86_64.exe \
--repo segfaultcafe/flechaDebian and Ubuntu users can install the downloaded package with:
sudo apt install ./flecha-0.4.0-linux-x86_64.debLinux and macOS users can use the checksum-verifying fallback installer:
curl --proto '=https' --tlsv1.2 -fsSLO \
https://github.com/segfaultcafe/flecha/releases/download/v0.4.0/install.sh
sh install.shPowerShell users can install the matching portable bundle with:
Invoke-WebRequest `
https://github.com/segfaultcafe/flecha/releases/download/v0.4.0/install.ps1 `
-OutFile install.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1Homebrew, WinGet, MSYS2 UCRT64, the Flecha APT repository, and flecha-bin in
the AUR are promoted from the exact qualified release hashes after the GitHub
release completes. See the distribution guide for channel
commands, signing, verification, and publication order.
The verified VSIX remains attached to the GitHub release. Marketplace and Open
VSX availability are separate from the release asset and may follow after the
publisher listings are approved.
Upgrading from 0.3.x
Install the compiler, Longbow, language server, and editor integration from the
same 0.4.0 release. Regenerate and commit Longbow locks before relying on an
offline build with the new toolchain.
Migrate compiler-derived JSON
JSON serialization and deserialization are now ordinary library behaviors.
The compiler no longer recognizes a special json decoration, generates JSON
methods, or provides __json_slice_append. Upgrade the matching flecha/json
package and replace calls such as:
Value::fromJson(source)
with the behavior-based generic API:
json::from<Value>(source)
Review the JSON library migration guide for
decoration imports, generated interface requirements, error handling, and
writer changes.
Review test-module access
A logical _test module may now access private fields and methods from its
paired production module. The privilege is one-way: runtime modules still
cannot import test modules, and tests cannot export proxy declarations.
longbow test compiles each logical test module once and streams completed
results according to the selected verbosity.
Review async boundaries
Async execution in 0.4 is deliberately scoped and single-threaded. Task
creation, checking, joining, forwarding, cancellation, borrowed results, and
cleanup are statically constrained. Code must not assume a public low-level
future API, parallel execution, timers, or asynchronous network/file I/O.
Review callable and owning-slice assumptions
Consuming once func values may now be empty, compared with none, and
reinitialized; invoking an empty value produces a structured crash. Reusable
callables remain nonempty. Managed owning slices may be borrowed as &own []T
for checked mutation or &const own []T for shared capacity access, but normal
aliasing and lifetime restrictions still apply.
Qualification and known limitations
The release commit must pass the uncached complete suite, AddressSanitizer and
UndefinedBehaviorSanitizer, deterministic compiler stress and hardening
campaigns, standard-library tests, editor packaging, and clean installed
packages on all four supported targets. The release workflow publishes the
qualified Windows artifacts unsigned and generates identity-bound GitHub
attestations for every final asset and the checksum manifest.
Remaining limitations include:
- no native MSVC ABI, cross-compilation contract, or stable general aggregate
ABI; - no multithreaded execution or concurrency memory model;
- no async timers, async filesystem/network I/O, HTTP, TLS, or WebSockets in
the 0.4 standard library; - no bundled time-zone database, locale formatting, Unicode normalization,
locale case folding, grapheme segmentation, URL parser, or IDNA; and - source-only public Flecha packages rather than precompiled package objects or
package-defined native build scripts.
There are no accepted reproducible release-blocking crashes, hangs,
memory-safety violations, ownership violations, or silent-corruption defects at
release preparation time.
Verifying the toolchain
After installation, start a fresh terminal and verify the coordinated tools:
sha256sum --check SHA256SUMS --ignore-missing
flecha --version
longbow --versionBoth version commands must report 0.4.0. The language-server stdio handshake,
bundled runtime dependencies, native compilation, Longbow package workflows,
and relocated installation are independently exercised before release assets
are attached.