diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 92794c2..0000000 Binary files a/.DS_Store and /dev/null differ 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"))