Repository navigation
v0.6.0 - One way in, and in the browser
0.6.0 gives every binding one way to reach the core, puts HyperUuid in the browser for C#, Rust, Python, Go and Swift, and makes every package smaller. 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 beforeRust wasm32-unknown-unknownwith getrandom'swasm_jsfeaturePython (new) Pyodide: await micropip.install("hyperuuid")finds a newpyemscriptenwheel on PyPI (~73 KB). The whole test suite runs inside Pyodide in CI.Go (new) TinyGo 0.42+ with -target=wasm, the core linked inSwift (new) the wasm32-wasip1build, run in a page through a WASI shim -
Go links the core, and that's the only way. cgo statically links a ~20 KB archive 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 a build used to extract to a temp file.
- Dependencies:
go.modneeds onlygoogle/uuid.
-
Swift links the core on every platform. macOS and Windows join Linux and WebAssembly: no loader, no resource bundle, and nothing to deploy beside your executable.
-
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, for Ruby 3.3, a Ruby newer than this release, Intel Macs and unbuilt platforms.
- Platform gems no longer carry Fiddle libraries.
-
Smaller everywhere.
- Every shipped library is stripped: linux-x64 is 16 KB, with identical machine code.
- The Ruby
x86_64-linux-gnugem is 339 KB, from 459 KB. - Go's module and the Composer package drop the embedded libraries.
- A Blazor app no longer copies a 3 MB archive into its output.
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-baseon Alpine) - macOS: the Xcode command-line tools
- Windows: MinGW-w64 gcc (llvm-mingw on arm64)
- Linux: gcc or clang (
- Unsupported builds fail at compile time, with an error that names the fix. That covers
CGO_ENABLED=0, stock Go'sGOOS=js/wasip1, and any other platform. - Drop the old build tags
-tags hyperuuid_dynamicand-tags hyperuuid_wasm. - API unchanged:
Available()is alwaystrue, andErrNativeUnavailableis deprecated.
Swift.
- Nothing to deploy any more on macOS and Windows: remove the step that copied
HyperUuid_HyperUuid.bundle/.resourcesbeside your executable. NativeLibraryErrorhas no cases now, so code matching.openFailed/.symbolNotFoundno 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-linuxor 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 and the Gemfile group. HYPERUUID_WASMis now ignored. The native backend always loads.
Rust, C#, Java and PHP are drop-in. Rust now declares rust-version = "1.85".
Fixes
- Python on Pyodide: about a quarter of no-argument
new_v6()/new_v7()calls would have stamped the previous millisecond, because of how Emscripten reports the clock. Fixed before the wheel shipped. - C#: a Blazor WebAssembly app no longer gets the 3 MB
libhyperuuid.ainbin/and the publish output. - Rust: the
no-panicproof from a consumer's crate is documented: it needslto = truein your release profile.
Proven, not shipped
- PHP and Ruby in the browser both work.
- PHP: the
ext-php-rsextension runs as a WordPress Playground side module, andphp/README.mdhas the full recipe. - Ruby: ruby.wasm with Magnus works too, but waits on two Magnus fixes.
- Both are documented with what it would take to ship them.
- PHP: the
- Upstream issues filed on the way:
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/libhyperuuid.a \
--repo SkunkWerkx/HyperUuid --signer-repo SkunkWerkx/.githubThe Python wheels, the Pyodide wheel included, verify the same way, or with --owner SkunkWerkx.