From 484dfb71bc8fed8dd6f5cc993da5b359a27de3e1 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Wed, 19 Nov 2025 12:04:43 +0100 Subject: [PATCH] Update to zig v0.15 - Added manifest.scm --- .DS_Store | Bin 8196 -> 0 bytes .envrc | 1 + .gitignore | 2 + .idea/.gitignore | 8 - .idea/editor.xml | 580 ----------------------------------------- .idea/fastgltf-zig.iml | 8 - .idea/modules.xml | 8 - .idea/vcs.xml | 6 - .idea/zigbrains.xml | 7 - build.zig | 33 +-- manifest.scm | 5 + 11 files changed, 25 insertions(+), 633 deletions(-) delete mode 100644 .DS_Store create mode 100644 .envrc delete mode 100644 .idea/.gitignore delete mode 100644 .idea/editor.xml delete mode 100644 .idea/fastgltf-zig.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/zigbrains.xml create mode 100644 manifest.scm diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 92794c20870ab9b0a901bd879d9ce3cadb31ddab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmZQzU|@7AO)+F(kYHe7;9!8z0^AH(0Z1N%F(jFwA}k>D7#IW?7z!A27*dnUiwlx+ zpmL+sXb6mkz-S1JhQMeDjE2DA3IRrlb2xC+`w-btax?@+LtsRP0H}OWfVAxy9H4Xq zga%15FfuTJy8w&~44^ImIE)y<{Qw4#97rpO25AM+Agv6HAQspRuvP{}s8&XBHw2_l z0BR0cI|C!wW{@~oI|C!wW(EdEh;{}>sLhPf9ttBwI|Cy`I|C!wcCeA7#ApbNh5%X! zfU*xeLn=cBLn1>ia{oO)iGhJ(M^ZsfW^svu!8JxEW)@a9b`Ew9ZjRXCjQsN8lEjkI zVyDESXb>+XKR+i4#!gHM%SN^o#;aK;NrR971tTk0qn8kp4TC{$Y-8R#gOn;X{Fa&m|&>strKXXoVR<#$1R z0V@m`cp-c^+0DSfz|K&`kjaqFpv#cYP|8pO8I>3~Um2Mh=qQ+2n1g&}4q_V{m{9Jk zoZ>R)q#Tg1m^EN=brTj>oLpQyQV|i6QPJ@N0;R>NL8&>3C7ETZE{P?n#qk3C#TohK zp2_)n0Y#~0nW^RB$@w{@xp~F$0)okjImx9ti6yCyIXS_ZRjI{Mi4`HK6(t~cL^npI01~T2!2wpU26$j#o@hSzX7_%-X@#%P;5( zAHRU0kT4flRAx$QUP)$JW@=Grd1gvUMr2}fa%x^mW?p)DS!Qu&Qch|}USe*lz+_I& zE8-H8d{WXiAkwBU`0|ETvi+c-kjlO5D!BHZMp0@1Q~TWBa-uTb5rw5iXp;IQZ5_<2RY(E zcKak2m-rW?=0UBOa+mVt5IDgRRh*Gnl9t<%I=?n!7)eJ2RGZ|(v%w|}{u$f^W!x4sa4A&TLGu&mk z$8ewF1;Yo1Z;T9#jEu~TER4L2VvOR9l8jP}>Wl`AhKxpxc8u zQk=_<%Yjp1GN%9o*cvBiIXMAPwxLS$UB|GUVK2i`hKmf>7#=gcV0g>$hmn<$n^BNa zno*fil~IFHlTnM&n9-EcoY8{OlF^CLh0zV1d;=MS8ABPv7{eJ87?T)N7*iS381oqm z8H*T;8EY8p7#qMzxSO$uv5&EzaU$a^#yO1h80RxC04L`4j5{F75S}=_A$%CgcoN2< z2h9wzL;}?RcV%F}HU1A#HA;?#z-R~z%Mf5>aS3*D0(Z)>`w!ID2KA>CpwghK71SMP w1og`y`anuRU3*Y}0z^Z*<6s3KtspUQSDcZ70i<={1_DOw|Izw?wEkxR0GKMO4FCWD diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..79a8bde --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use guix diff --git a/.gitignore b/.gitignore index 3389c86..462a244 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .zig-cache/ zig-out/ +.DS_Store +.idea/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/editor.xml b/.idea/editor.xml deleted file mode 100644 index 95d51a7..0000000 --- a/.idea/editor.xml +++ /dev/null @@ -1,580 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/fastgltf-zig.iml b/.idea/fastgltf-zig.iml deleted file mode 100644 index bc2cd87..0000000 --- a/.idea/fastgltf-zig.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 6d9f582..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/zigbrains.xml b/.idea/zigbrains.xml deleted file mode 100644 index c1e2dd4..0000000 --- a/.idea/zigbrains.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/build.zig b/build.zig index 94755fa..7e014bc 100644 --- a/build.zig +++ b/build.zig @@ -24,12 +24,17 @@ pub fn build(b: *std.Build) !void { const simdjson_evex512: ?*std.Build.Step.WriteFile = if (target.result.cpu.arch == .x86_64) try fix_evex512_simdjson(b, simdjson_dep) else null; const simdjson_source_file_root = if (simdjson_evex512) |evex512| evex512.getDirectory() else simdjson_dep.path("singleheader"); - const simdjson_lib = b.addStaticLibrary(.{ - .name = "simdjson", + const simdjson_mod = b.addModule("simdjson", .{ .target = target, .optimize = optimize, .link_libc = true, }); + + const simdjson_lib = b.addLibrary(.{ + .name = "simdjson", + .root_module = simdjson_mod, + .linkage = .static, + }); simdjson_lib.linkLibCpp(); simdjson_lib.addCSourceFiles(.{ .root = simdjson_source_file_root, @@ -43,18 +48,13 @@ pub fn build(b: *std.Build) !void { if (simdjson_evex512) |evex512| simdjson_lib.step.dependOn(&evex512.step); b.installArtifact(simdjson_lib); - const fastgltf_lib: *std.Build.Step.Compile = switch (preferred_link_mode) { - inline else => |x| switch (x) { - .static => std.Build.addStaticLibrary, - .dynamic => std.Build.addSharedLibrary, - }(b, .{ - .name = "fastgltf", - // .version = version, - .target = target, - .optimize = optimize, - .link_libc = true, - }), - }; + const fastgltf_mod = b.addModule("fastgltf", .{ + .target = target, + .optimize = optimize, + .link_libc = true, + }); + + const fastgltf_lib = b.addLibrary(.{ .name = "fastgltf", .linkage = preferred_link_mode, .root_module = fastgltf_mod }); fastgltf_lib.linkLibCpp(); fastgltf_lib.linkLibrary(simdjson_lib); fastgltf_lib.addIncludePath(fastgltf_dep.path(b.pathJoin(&.{"include"}))); @@ -77,11 +77,12 @@ pub fn build(b: *std.Build) !void { }); b.installArtifact(fastgltf_lib); - const example = b.addExecutable(.{ - .name = "fastgltf-example", + const example_mod = b.addModule("fastgltf-example", .{ .target = target, .optimize = optimize, }); + + const example = b.addExecutable(.{ .name = "fastgltf-example", .root_module = example_mod }); example.linkLibCpp(); example.addIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.install_path, "include" }) }); example.linkLibrary(fastgltf_lib); diff --git a/manifest.scm b/manifest.scm new file mode 100644 index 0000000..5778a17 --- /dev/null +++ b/manifest.scm @@ -0,0 +1,5 @@ +;; What follows is a "manifest" equivalent to the command line you gave. +;; You can store it in a file that you may then pass to any 'guix' command +;; that accepts a '--manifest' (or '-m') option. + +(specifications->manifest (list "zig@0.15" "git" "zig-zls@0.15"))