Repository navigation
v0.3.0: a module for each platform
Each platform is now a Go module of its own. A build downloads the archives of your platform and no other.
What changed
- Each target is a module in
libmagic/<goos>_<goarch>/, such asgithub.com/xo/magic/libmagic/linux_amd64/v5. The root module imports the module of your platform and holds no archives. The root module is now about 12 MB. - Before this release, every user downloaded the archives of every platform. After it, a
go builddownloads the root module and one target module (6.7 to 9.6 MB). We tested this on linux/amd64 from an empty module cache. go getandgo mod tidystill fetch every target module once, because they read the imports for all platforms. The next build downloads one.- The import path
github.com/xo/magicand the API do not change. Rungo get github.com/xo/magic@v0.3.0.
New platforms
magic now builds the same platforms as resvg:
- linux: amd64, arm64, arm (armv7)
- darwin: amd64, arm64
- windows: amd64, arm64
- freebsd: amd64
The new targets are windows/arm64 and freebsd/amd64. The Linux archives are static and built for musl, so a program links them under glibc and under musl.
How well each platform is tested
- The tests pass in CI on linux/amd64, linux/arm64, macOS arm64, windows/amd64 and windows/arm64. On windows/arm64, the C compiler is clang from llvm-mingw.
- linux/arm passed under qemu on the build host, and has no CI job.
- freebsd/amd64 links into a program. Nothing has run it, because GitHub has no hosted FreeBSD runner.
- macOS amd64 has no CI result, because its CI job never gets a runner.
Versions
- libmagic 5.48 (file 5.48)
- zlib 1.3.2, bzip2 1.0.8, xz 5.8.4, zstd 1.5.7
- libgnurx 2.5.1 on Windows, which is under LGPL 2.1
Tags
- The root tag is
v0.3.0. - Each target tag is the path of its folder and the version of file, such as
libmagic/linux_amd64/v5.48.0.
The decisions are D16 to D19 in docs/PLAN.md.