Skip to content

v0.6.0 - one way in, in the browser, and impossible dates are out of range

Choose a tag to compare

@buvinghausen buvinghausen released this 03 Oct 04:22
· 136 commits to master since this release

0.6.0 brings HyperCast level with HyperUuid's 0.6.0. Every binding reaches the core one way, HyperCast runs in the browser for C#, Rust, Python, Go and Swift, and every package is smaller. There was no HyperCast 0.5.0, so this release also carries that round's work. The full list is in CHANGELOG.md.

Highlights

  • In the browser, proven in a browser. Every route below runs in headless Chrome in CI, on every PR.

    Language How
    C# Blazor WebAssembly (.NET 11+): a plain PackageReference, as before
    Rust wasm32-unknown-unknown, no extra setup
    Python (new) Pyodide: await micropip.install("hypercast") finds a new pyemscripten wheel on PyPI (~150 KB). The whole test suite runs inside Pyodide in CI.
    Go (new) TinyGo 0.42+ with -target=wasm, the core linked in
    Swift (new) the wasm32-wasip1 build, run in a page through a WASI shim
  • Go links the core, and that's the only way. cgo statically links the core on Linux, macOS and now Windows, using the same MSVC archive C# links under Native AOT.

    • Removed: purego, the loading cgo backend, the wasmtime backend, and the nine embedded libraries under go/native/.
  • Swift links the core on every platform. macOS and Windows join Linux and WebAssembly: no loader, no resource bundle, nothing to deploy beside your executable, and no door that can throw.

  • Ruby runs Magnus on Alpine.

    • New musl platform gems carry Magnus extensions for Ruby 3.4 and 4.0.
    • Fiddle is now only the universal gem's last resort.
    • Platform gems no longer carry Fiddle libraries.
  • Smaller everywhere.

    • The native libraries are built without Rust's standard library, and stripped. The linux-x64 library is 104,496 bytes, from 529,960 in 0.4.0.
    • Go's module and the Composer package drop their embedded libraries, and the Composer archive no longer carries the other bindings.
    • A Blazor app no longer copies a 3 MB archive into its output.
  • Proven, every PR.

    • Panics: every door except cast_f32/cast_f64 is proved at link time unable to panic. The two float doors' remaining paths are inside core's float parser.
    • Correctness: a round-trip suite checks about 34,000 one-character edits against a naive reference parser.
    • Rust: the crate declares rust-version = "1.88", with clippy, semver and MSRV checks.

Upgrade notes

Go (breaking: the reason this is 0.6.0).

  • Needs cgo and a C compiler where it's built:
    • Linux: gcc or clang (build-base on Alpine)
    • macOS: the Xcode command-line tools
    • Windows: MinGW-w64 gcc (llvm-mingw on arm64)
  • Unsupported builds fail at compile time, with an error that names the fix. That covers CGO_ENABLED=0, stock Go's GOOS=js/wasip1, and any other platform. Use TinyGo for WebAssembly.
  • Drop the old build tags -tags hypercast_dynamic and -tags hypercast_wasm.
  • API unchanged: Available() is always true, and ErrNativeUnavailable is deprecated.

Every package: impossible dates and times are OutOfRange, not Malformed.

  • Malformed now means the wrong shape: a missing separator, a stray character, three digits where two belong.
  • Text shaped right that names something nonexistent is OutOfRange. That covers month 13, 2026-02-30, 24:00, a :60 leap second, an offset past 23:59, the colon duration 25:00:00, and Excel's phantom 1900 serial 60.
  • The fault span still points at the same field. Year 0000 now points at the year instead of the whole date.
  • Shape is checked across the whole input first, so 2026-13-01T00:00:00x is Malformed at the x.
  • Code that only checks for success, or reports the span, needs nothing.

Swift.

  • Nothing to deploy any more on macOS and Windows: remove the step that copied HyperCast_HyperCast.bundle/.resources beside your executable.
  • NativeLibraryError has no cases now, so code matching .openFailed/.symbolNotFound no longer compiles.
  • Unsupported platforms fail at compile time.

Ruby.

  • Alpine moves from Fiddle to Magnus automatically.
  • The glibc platform gems are renamed x86_64-linux-gnu / aarch64-linux-gnu. RubyGems and Bundler resolve them by themselves; only an explicit --platform x86_64-linux or a pinned gem file name needs updating.
  • Intel Macs stay on Fiddle via the universal gem.

Python and Ruby.

  • The opt-in wasmtime backend is gone, along with the [wasm] extra.
  • HYPERCAST_WASM is now ignored. The native backend always loads.

C#, Java, PHP and Rust are drop-in apart from the verdict change above.

Fixes

  • Rust: default-features = false builds on every target again. Through 0.4.0 it failed with "#[panic_handler] function required" everywhere but bare metal.
  • Rust: cast_uuid now passes the no-panic proof from a consumer's crate too. Running it from your own crate needs lto = true in your release profile.
  • C#: a Blazor WebAssembly app no longer gets the 3 MB libhypercast.a in bin/ and the publish output.
  • Python: the wheels are built, installed and called on their own platform on every CI run, and the release publishes exactly those. Through 0.4.0 they were first built at the tag.

Proven, not shipped

  • PHP in the browser works: the ext-php-rs extension runs as a WordPress Playground side module (258 KB, 85 KB gzipped), and php/README.md has the recipe.
  • Ruby in the browser is proven in HyperUuid and waits on two Magnus fixes (magnus#186, magnus#187).

Verifying

Every native library and static archive in this release is built by CI and carries a build-provenance attestation:

gh attestation verify go/staticlib/linux_amd64/libhypercast.a \
  --repo SkunkWerkx/HyperCast --signer-repo SkunkWerkx/.github

The Python wheels, the Pyodide wheel included, verify the same way, or with --owner SkunkWerkx.