https://github.com/squeek502/compressed_mingw_includes
maximally compressed set of MinGW headers as a Zig module
https://github.com/squeek502/compressed_mingw_includes
Last synced: 2 months ago
JSON representation
maximally compressed set of MinGW headers as a Zig module
- Host: GitHub
- URL: https://github.com/squeek502/compressed_mingw_includes
- Owner: squeek502
- Created: 2023-12-29T10:16:33.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-23T07:29:57.000Z (about 1 year ago)
- Last Synced: 2025-01-29T12:32:40.307Z (4 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
compressed_mingw_includes
-------------------------An attempt at exposing a maximally compressed set of MinGW includes (via `@embedFile` of a `.tar.zst` compressed with zstandard level 19) as a Zig module. For context, the includes are ~69MiB uncompressed and ~6MiB compressed.
The only intention here is to be able to embed a full set of MinGW includes in standalone builds of [resinator](https://github.com/squeek502/resinator) that can be extracted on-demand.
## Building
Running
```
./build.sh
```will download MinGW, build the header files, compress them, and then create a Zig module-ready `.tar.gz` at `build/compressed_mingw_includes.tar.gz`.
## Usage
The `.tar.gz` then needs to be hosted (see [Releases](https://github.com/squeek502/compressed_mingw_includes/releases)), in which case it can be included in your `build.zig.zon`/`build.zig` file like so:
```zig
.{
// ...
.dependencies = .{
.compressed_mingw_includes = .{
.url = "https://github.com/squeek502/compressed_mingw_includes/releases/download/1.0.2/compressed_mingw_includes.tar",
.hash = "12209b760f6780e143f9cde540487494292aaf07c08b49ac5f58f8339307a733db3e",
},
},
// ...
}
``````zig
// ...
const compressed_mingw_includes = b.dependency("compressed_mingw_includes", .{});
const compressed_mingw_includes_module = compressed_mingw_includes.module("compressed_mingw_includes");
// ...
```