Skip to content

v0.6.1 - Ruby in the browser

Choose a tag to compare

@buvinghausen buvinghausen released this 03 Oct 20:31
· 138 commits to master since this release
c355f35

0.6.1 adds Ruby to the browser languages: HyperCast now runs in a web page from C#, Rust, Python, Go, Swift and Ruby. It also fixes four papercuts from 0.6.0 in Rust, C#, Go and the Ruby extension. The full list is in CHANGELOG.md.

Highlights

  • Ruby in the browser: the new hypercast-wasm gem. ruby.wasm links extensions into the interpreter when rbwasm build makes it. So in the Gemfile you hand to rbwasm build, list hypercast-wasm instead of hypercast:

    gem "hypercast-wasm"
    gem "js"
    gem "bigdecimal" # only for Decimal#to_d
    • Same extension: you get the same Magnus extension as the platform gems, prebuilt for wasm32-wasip1, so HyperCast::BACKEND is :native and every door works as on a host Ruby.
    • No Rust toolchain: the gem carries one archive for Ruby 3.4 and one for 4.0, and --ruby-version picks.
    • Shares an interpreter with HyperUuid: hyperuuid-wasm links into the same interpreter.
    • Tested in CI: CI builds each archive from the commit, attests it, and runs the gem linked into a fresh interpreter under Node and in headless Chrome.

    See Ruby in the browser.

    This was listed under "Proven, not shipped" in 0.6.0. @matsadler fixed both Magnus bugs that held it back (magnus#186, #187) and shipped them in Magnus 0.8.3 and 0.9.2 the day after they were filed. That's what made this release possible. Thank you, Mat!

Fixes

  • Ruby: the Magnus extension compiles on 32-bit targets. It held raw VALUEs as u64, which only type-checks where VALUE is 64 bits; the first wasm32-wasip1 build caught it. Nothing changes on the platform gems' targets.
  • Rust: the no-panic proof from a consumer's crate now passes with lto = true alone, as the README says. cast_uuid used to keep a bounds check that depended on the optimizer; it now reads every byte with get. Verdicts and speed are unchanged.
  • C#: a .NET 10 project is refused at restore with NuGet's NU1202, instead of restoring and then failing to compile on missing HyperCast types. The targets file now ships under build/net11.0/ and buildTransitive/net11.0/. Nothing changes for .NET 11, Native AOT or Blazor WebAssembly.
  • Go: printing a nil *Fault (a door's success) no longer traps under TinyGo. Error returns <nil> for a nil receiver itself.

Upgrade notes

Drop-in for every binding. The Ruby extension now builds on Magnus 0.9.2 (from 0.8.2), with no API change. On .NET 10 the package is now refused at restore rather than at compile, and it never worked there.

Verifying

Every native library, static archive and wasm32-wasip1 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 gems, hypercast-wasm included, are attested by this repo's own release.yml, so --repo SkunkWerkx/HyperCast alone verifies them. The Python wheels verify the same way, or with --owner SkunkWerkx.