Skip to content

Releases: godicom-dev/goopenjpeg

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 10:54
9328ca2

Platform matrix

Every desktop platform is now covered, up from four:

OS amd64 arm64
Linux
macOS new
Windows new

darwin/amd64 is cross-compiled on the arm64 runner and tested through Rosetta 2;
windows/arm64 is cross-compiled with MSVC's ARM64 toolchain and tested on a real
windows-11-arm runner, so purego's Windows ARM64 path is exercised for real
rather than only cross-built. The darwin libraries are thin rather than universal,
because //go:embed puts whatever is there into every user's binary and a
universal file would double that cost for both Macs.

Importing this module is now safe everywhere

Loading the native library used to happen in init(), so on a platform with no
prebuilt library the process died at startup — before main ran, with no way for
the caller to handle it. The library now loads lazily on first use, and every
entry point returns an error wrapping ErrUnsupportedPlatform instead:

img, err := goopenjpeg.Decode(data)
if errors.Is(err, goopenjpeg.ErrUnsupportedPlatform) {
	// no library for this GOOS/GOARCH; err names which one
}

A 32-bit target, js/wasm, a BSD — the module still compiles and importing it
stays safe. Only JPEG 2000 fails. A read-only or noexec TMPDIR now surfaces
the same way, as an error from the first call.

The cross-build CI job compiles for windows/386, linux/386, linux/arm,
linux/riscv64, linux/ppc64le, js/wasm and wasip1/wasm so this keeps
holding.

One embedded library per binary

The six libraries total about 7.7 MB, but a binary only ever carries the one it
can load — every //go:embed sits behind a per-platform build tag. The new
checks CI job asserts that set for each platform with go list -f '{{.EmbedFiles}}', because one careless libs/* glob or one forgotten build tag
would put all six into every binary and nothing else would notice. go get still
downloads all six (they are one module), but that is paid once in the module
cache, not per build and not per user binary.

Also

  • gofmt and go vet ./... are now gated in CI by the same checks job.

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Aug 15:24
ci: update prebuilt native libraries

v1.1.1

Choose a tag to compare

@xbmlz xbmlz released this 13 Jul 08:43

Full Changelog: v1.1.0...v1.1.1

v1.1.0

Choose a tag to compare

@xbmlz xbmlz released this 13 Jul 08:40
19fe49b

What's Changed

  • feat: JPEG 2000 encode API by @xbmlz in #1

New Contributors

  • @xbmlz made their first contribution in #1

Full Changelog: v1.0.2...v1.1.0

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 02 Jul 16:07
chore: go 1.26 minimum