Added zig-wgpu import
This commit is contained in:
parent
5f833a5e58
commit
957f75243f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
zig-out
|
||||
.zig-cache
|
||||
mkdocs.yaml
|
||||
zig-pkg
|
||||
|
||||
10
build.zig
10
build.zig
@ -4,10 +4,16 @@ pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const zig_wgpu = b.dependency("zig_wgpu", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
// 1. Define the module so other projects can import it
|
||||
_ = b.addModule("dimal", .{
|
||||
const mod = b.addModule("dimal", .{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
});
|
||||
mod.addImport("gpu", zig_wgpu.module("zig-wgpu"));
|
||||
|
||||
const exe_tests = b.addTest(.{
|
||||
.root_module = b.createModule(.{
|
||||
@ -18,6 +24,7 @@ pub fn build(b: *std.Build) void {
|
||||
.test_runner = .{ .path = b.path("test_runner.zig"), .mode = .simple },
|
||||
});
|
||||
|
||||
exe_tests.root_module.addImport("gpu", zig_wgpu.module("zig-wgpu"));
|
||||
const run_exe_tests = b.addRunArtifact(exe_tests);
|
||||
const test_step = b.step("test", "Run tests");
|
||||
test_step.dependOn(&run_exe_tests.step);
|
||||
@ -30,6 +37,7 @@ pub fn build(b: *std.Build) void {
|
||||
.imports = &.{},
|
||||
}),
|
||||
});
|
||||
bench_exe.root_module.addImport("gpu", zig_wgpu.module("zig-wgpu"));
|
||||
|
||||
b.installArtifact(bench_exe);
|
||||
|
||||
|
||||
@ -3,7 +3,12 @@
|
||||
.version = "0.2.2",
|
||||
.fingerprint = 0x9453b1ff1e52d858,
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{},
|
||||
.dependencies = .{
|
||||
.zig_wgpu = .{
|
||||
.url = "git+https://git.bouvais.lu/adrien/zig-wgpu?ref=0.2.0#9c329a5a0657b00682958457bb118e2fc977dd63",
|
||||
.hash = "zig_wgpu-0.2.0-xsLAy56X0QMafD4OTAvoQIJSo5VDBiw3B24DcB6wd1ZO",
|
||||
},
|
||||
},
|
||||
.paths = .{
|
||||
"build.zig",
|
||||
"build.zig.zon",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user