Skip to content

Commit 1a80092

Browse files
committed
[BREAKING]: Retire build Package API
1 parent 1cd89f0 commit 1a80092

File tree

141 files changed

+2393
-2802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+2393
-2802
lines changed

README.md

+30-33
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ zig build -l
5151

5252
### Using the [Libraries](#Libraries)
5353

54-
Option to download packages using Zig Package Manager **coming soon!**
55-
5654
Copy each library to a subdirectory in your project and add them as local package dependencies. For example:
5755

5856
`build.zig.zon`
@@ -72,45 +70,44 @@ Copy each library to a subdirectory in your project and add them as local packag
7270
`build.zig`
7371

7472
```zig
75-
const zglfw = @import("zglfw");
76-
7773
pub fn build(b: *std.Build) void {
78-
const zglfw_pkg = zglfw.package(b, target, optimize, .{});
79-
80-
...
74+
const exe = b.addExecutable(.{ ... });
8175
82-
zglfw_pkg.link(exe);
83-
84-
...
85-
}
76+
const zglfw = b.dependency("zglfw", .{});
77+
exe.root_module.addImport("zglfw", zglfw.module("root"));
78+
exe.linkLibrary(zglfw.artifact("glfw"));
79+
}
8680
```
8781

8882
Refer to each lib's README.md for further usage intructions.
8983

84+
Option to download packages using Zig Package Manager **coming soon!**
85+
9086

9187
## Libraries
92-
| Library | Latest version | Description |
93-
|-------------------------------|----------------|----------------------------------------------------------------------------------------------------------------------------|
94-
| **[zphysics](libs/zphysics)** | 0.0.6 | Build package, [C API](https://github.com/zig-gamedev/zig-gamedev/tree/main/libs/zphysics/libs/JoltC) and bindings for [Jolt Physics](https://github.com/jrouwe/JoltPhysics) |
95-
| **[zflecs](libs/zflecs)** | 0.0.1 | Build package and bindings for [flecs](https://github.com/SanderMertens/flecs) ECS |
96-
| **[zopengl](libs/zopengl)** | 0.4.3 | OpenGL loader (supports 4.2 Core Profile and ES 2.0 Profile) |
97-
| **[zsdl](libs/zsdl)** | 0.0.1 | Bindings for SDL2 and SDL3 (wip) |
98-
| **[zgpu](libs/zgpu)** | 0.9.1 | Small helper library built on top of native WebGPU implementation ([Dawn](https://github.com/michal-z/dawn-bin)) |
99-
| **[zgui](libs/zgui)** | 1.89.6 | Build package and bindings for [Dear Imgui](https://github.com/ocornut/imgui) (includes [ImPlot](https://github.com/epezent/implot)) |
100-
| **[zaudio](libs/zaudio)** | 0.9.4 | Build package and bindings for [miniaudio](https://github.com/mackron/miniaudio) |
101-
| **[zmath](libs/zmath)** | 0.9.6 | SIMD math library for game developers |
102-
| **[zstbi](libs/zstbi)** | 0.9.3 | Image reading, writing and resizing with [stb](https://github.com/nothings/stb) libraries |
103-
| **[zmesh](libs/zmesh)** | 0.9.0 | Loading, generating, processing and optimizing triangle meshes |
104-
| **[ztracy](libs/ztracy)** | 0.10.0 | Support for CPU profiling with [Tracy](https://github.com/wolfpld/tracy) |
105-
| **[zpool](libs/zpool)** | 0.9.0 | Generic pool & handle implementation |
106-
| **[zglfw](libs/zglfw)** | 0.8.0 | Build pacakage & bindings for [GLFW](https://github.com/glfw/glfw) |
107-
| **[znoise](libs/znoise)** | 0.1.0 | Build pacakge & bindings for [FastNoiseLite](https://github.com/Auburn/FastNoiseLite) |
108-
| **[zjobs](libs/zjobs)** | 0.1.0 | Generic job queue implementation |
109-
| **[zbullet](libs/zbullet)** | 0.2.0 | Build package, C API and bindings for [Bullet physics library](https://github.com/bulletphysics/bullet3) |
110-
| **[zwin32](libs/zwin32)** | 0.9.0 | Bindings for Win32 API (d3d12, d3d11, xaudio2, directml, wasapi and more) |
111-
| **[zd3d12](libs/zd3d12)** | 0.9.0 | Helper library for DirectX 12 |
112-
| **[zxaudio2](libs/zxaudio2)** | 0.9.0 | Helper library for XAudio2 |
113-
| **[zpix](libs/zpix)** | 0.9.0 | Support for GPU profiling with PIX for Windows |
88+
| Library | Description |
89+
|-------------------------------|----------------------------------------------------------------------------------------------------------------------------|
90+
| **[zaudio](libs/zaudio)** | Cross-platform audio using [miniaudio](https://github.com/mackron/miniaudio) |
91+
| **[zbullet](libs/zbullet)** | Build package, [C API](https://github.com/zig-gamedev/zig-gamedev/tree/main/libs/zbullet/libs/cbullet) and bindings for [Bullet physics](https://github.com/bulletphysics/bullet3) |
92+
| **[zd3d12](libs/zd3d12)** | Helper library for DirectX 12 |
93+
| **[zflecs](libs/zflecs)** | Build package and bindings for [flecs](https://github.com/SanderMertens/flecs) ECS |
94+
| **[zglfw](libs/zglfw)** | Build package & bindings for [GLFW](https://github.com/glfw/glfw) |
95+
| **[zgpu](libs/zgpu)** | Small helper library built on top of [Dawn](https://github.com/zig-gamedev/dawn) native WebGPU implementation |
96+
| **[zgui](libs/zgui)** | Build package and bindings for [Dear Imgui](https://github.com/ocornut/imgui) (includes [ImPlot](https://github.com/epezent/implot)) |
97+
| **[zjobs](libs/zjobs)** | Generic job queue implementation |
98+
| **[zmath](libs/zmath)** | SIMD math library for game developers |
99+
| **[zmesh](libs/zmesh)** | Loading, generating, processing and optimizing triangle meshes |
100+
| **[znoise](libs/znoise)** | Build pacakge & bindings for [FastNoiseLite](https://github.com/Auburn/FastNoiseLite) |
101+
| **[zopengl](libs/zopengl)** | OpenGL loader (supports 4.2 Core Profile and ES 2.0 Profile) |
102+
| **[zphysics](libs/zphysics)** | Build package, [C API](libs/zphysics/libs/JoltC) and bindings for [Jolt Physics](https://github.com/jrouwe/JoltPhysics) |
103+
| **[zpix](libs/zpix)** | Support for GPU profiling with PIX for Windows
104+
|
105+
| **[zpool](libs/zpool)** | Generic pool & handle implementation |
106+
| **[zsdl](libs/zsdl)** | Bindings for SDL2 and SDL3 |
107+
| **[zstbi](libs/zstbi)** | Image reading, writing and resizing with [stb](https://github.com/nothings/stb) libraries |
108+
| **[ztracy](libs/ztracy)** | Support for CPU profiling with [Tracy](https://github.com/wolfpld/tracy) |
109+
| **[zwin32](libs/zwin32)** | Bindings for Win32 API (d3d12, d3d11, xaudio2, directml, wasapi and more) |
110+
| **[zxaudio2](libs/zxaudio2)** | Helper library for XAudio2 | |
114111

115112
## Sample applications (native wgpu)
116113

0 commit comments

Comments
 (0)