From a3a5e3722554415fefd9a49037d0891fc5c1c0e7 Mon Sep 17 00:00:00 2001 From: Samuel Webb Date: Sun, 7 Apr 2024 13:58:52 -0400 Subject: [PATCH] Add sqlite/update jetzig --- build.zig | 12 +++++++++++- build.zig.zon | 8 ++++++-- src/app/views/root/_content.zmpl | 4 +++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index d80454e..e488390 100644 --- a/build.zig +++ b/build.zig @@ -15,10 +15,20 @@ pub fn build(b: *std.Build) !void { // Example dependency: const iguanas_dep = b.dependency("iguanas", .{ .optimize = optimize, .target = target }); exe.root_module.addImport("iguanas", iguanas_dep.module("iguanas")); + + const sqlite = b.dependency("sqlite", .{ + .target = target, + .optimize = optimize, + }); + + exe.root_module.addImport("sqlite", sqlite.module("sqlite")); + + // links the bundled sqlite3, so leave this out if you link the system one + exe.linkLibrary(sqlite.artifact("sqlite")); // All dependencies **must** be added to imports above this line. - try jetzig.jetzigInit(b, exe, .{}); + try jetzig.jetzigInit(b, exe, .{.zmpl_version = .v2}); b.installArtifact(exe); diff --git a/build.zig.zon b/build.zig.zon index e14a6d7..bb50052 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -16,13 +16,17 @@ // internet connectivity. .dependencies = .{ .jetzig = .{ - .url = "https://github.com/jetzig-framework/jetzig/archive/31e8ae36e1d7f68166114eefb867c23df352d537.tar.gz", - .hash = "1220d368ce21549ccd721d5f303888986fff5714835b1f266a62e329f85eabec8f19", + .url = "https://github.com/jetzig-framework/jetzig/archive/68ca4d3bbad05880e6e38fc6d10e7a24e772081e.tar.gz", + .hash = "122047ebabab1dfe1bb7f96ffdac98410ffb4850b06dc6b1670ce74aaeaa49bdc08e", }, .iguanas = .{ .url = "https://github.com/jetzig-framework/iguanas/archive/89c2abf29de0bc31054a9a6feac5a6a83bab0459.tar.gz", .hash = "12202fd319a5ab4e124b00e8ddea474d07c19c4e005d77b6c29fc44860904ea01a5c", }, + .sqlite = .{ + .url = "https://github.com/vrischmann/zig-sqlite/archive/a3095ac.tar.gz", + .hash = "12203f7d14722debe8f1a2168f28a262aaa5ec2457a7a975fc7dcc1123ed11597c98", + } }, .paths = .{ // This makes *all* files, recursively, included in this package. It is generally diff --git a/src/app/views/root/_content.zmpl b/src/app/views/root/_content.zmpl index 6d3a665..39bf503 100644 --- a/src/app/views/root/_content.zmpl +++ b/src/app/views/root/_content.zmpl @@ -13,6 +13,8 @@
Visit jetzig.dev to get started.
Join our Discord server and introduce yourself:
- https://discord.gg/eufqssz7X6 + Search for an artist, album, or song: + +