Skip to content

Commit d2b2a9b

Browse files
committed
fuck that
1 parent 8636dac commit d2b2a9b

Some content is hidden

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

51 files changed

+264809
-0
lines changed

ldb/build.zig

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
const std = @import("std");
2+
3+
// Although this function looks imperative, note that its job is to
4+
// declaratively construct a build graph that will be executed by an external
5+
// runner.
6+
pub fn build(b: *std.Build) void {
7+
// Standard target options allows the person running `zig build` to choose
8+
// what target to build for. Here we do not override the defaults, which
9+
// means any target is allowed, and the default is native. Other options
10+
// for restricting supported target set are available.
11+
const target = b.standardTargetOptions(.{});
12+
13+
// Standard optimization options allow the person running `zig build` to select
14+
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
15+
// set a preferred release mode, allowing the user to decide how to optimize.
16+
const optimize = b.standardOptimizeOption(.{});
17+
18+
const exe = b.addExecutable(.{
19+
.name = "LDB",
20+
// In this case the main source file is merely a path, however, in more
21+
// complicated build scripts, this could be a generated file.
22+
.root_source_file = .{ .path = "src/main.zig" },
23+
.target = target,
24+
.optimize = optimize,
25+
});
26+
27+
const lvm_module = b.addModule("lvm", .{ .source_file = .{ .path = "../LVM/src/lvm.zig" } });
28+
exe.addModule("lvm", lvm_module);
29+
30+
// This declares intent for the executable to be installed into the
31+
// standard location when the user invokes the "install" step (the default
32+
// step when running `zig build`).
33+
b.installArtifact(exe);
34+
35+
// This *creates* a Run step in the build graph, to be executed when another
36+
// step is evaluated that depends on it. The next line below will establish
37+
// such a dependency.
38+
const run_cmd = b.addRunArtifact(exe);
39+
40+
// By making the run step depend on the install step, it will be run from the
41+
// installation directory rather than directly from within the cache directory.
42+
// This is not necessary, however, if the application depends on other installed
43+
// files, this ensures they will be present and in the expected location.
44+
run_cmd.step.dependOn(b.getInstallStep());
45+
46+
// This allows the user to pass arguments to the application in the build
47+
// command itself, like this: `zig build run -- arg1 arg2 etc`
48+
if (b.args) |args| {
49+
run_cmd.addArgs(args);
50+
}
51+
52+
// This creates a build step. It will be visible in the `zig build --help` menu,
53+
// and can be selected like this: `zig build run`
54+
// This will evaluate the `run` step rather than the default, which is "install".
55+
const run_step = b.step("run", "Run the app");
56+
run_step.dependOn(&run_cmd.step);
57+
58+
// Creates a step for unit testing. This only builds the test executable
59+
// but does not run it.
60+
const unit_tests = b.addTest(.{
61+
.root_source_file = .{ .path = "src/main.zig" },
62+
.target = target,
63+
.optimize = optimize,
64+
});
65+
66+
const run_unit_tests = b.addRunArtifact(unit_tests);
67+
68+
// Similar to creating the run step earlier, this exposes a `test` step to
69+
// the `zig build --help` menu, providing a way for the user to request
70+
// running the unit tests.
71+
const test_step = b.step("test", "Run unit tests");
72+
test_step.dependOn(&run_unit_tests.step);
73+
}

ldb/run.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zig build run

ldb/src/main.zig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const std = @import("std");
2+
3+
pub fn main() !void {
4+
// Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
5+
std.debug.print("All your {s} are belong to us.\n", .{"codebase"});
6+
7+
// stdout is for the actual output of your application, for example if you
8+
// are implementing gzip, then only the compressed bytes should be sent to
9+
// stdout, not any debugging messages.
10+
const stdout_file = std.io.getStdOut().writer();
11+
var bw = std.io.bufferedWriter(stdout_file);
12+
const stdout = bw.writer();
13+
14+
try stdout.print("Run `zig build test` to run the tests.\n", .{});
15+
16+
try bw.flush(); // don't forget to flush!
17+
}
18+
19+
test "simple test" {
20+
var list = std.ArrayList(i32).init(std.testing.allocator);
21+
defer list.deinit(); // try commenting this out and see if zig detects the memory leak!
22+
try list.append(42);
23+
try std.testing.expectEqual(@as(i32, 42), list.pop());
24+
}

lvm/lvm-docs/.obsidian/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"accentColor": ""
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
"obsidian-git",
3+
"obsidian-icon-folder",
4+
"webpage-html-export",
5+
"dataview",
6+
"table-editor-obsidian"
7+
]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"file-explorer": true,
3+
"global-search": true,
4+
"switcher": true,
5+
"graph": true,
6+
"backlink": true,
7+
"canvas": true,
8+
"outgoing-link": true,
9+
"tag-pane": true,
10+
"properties": true,
11+
"page-preview": true,
12+
"daily-notes": true,
13+
"templates": true,
14+
"note-composer": true,
15+
"command-palette": true,
16+
"slash-command": false,
17+
"editor-status": true,
18+
"bookmarks": true,
19+
"markdown-importer": true,
20+
"zk-prefixer": false,
21+
"random-note": false,
22+
"outline": true,
23+
"word-count": true,
24+
"slides": true,
25+
"audio-recorder": false,
26+
"workspaces": false,
27+
"file-recovery": true,
28+
"publish": true,
29+
"sync": true
30+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
"file-explorer",
3+
"global-search",
4+
"switcher",
5+
"graph",
6+
"backlink",
7+
"canvas",
8+
"outgoing-link",
9+
"tag-pane",
10+
"properties",
11+
"page-preview",
12+
"daily-notes",
13+
"templates",
14+
"note-composer",
15+
"command-palette",
16+
"editor-status",
17+
"bookmarks",
18+
"markdown-importer",
19+
"outline",
20+
"word-count",
21+
"slides",
22+
"file-recovery",
23+
"publish",
24+
"sync"
25+
]

lvm/lvm-docs/.obsidian/graph.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"collapse-filter": true,
3+
"search": "",
4+
"showTags": false,
5+
"showAttachments": false,
6+
"hideUnresolved": false,
7+
"showOrphans": true,
8+
"collapse-color-groups": true,
9+
"colorGroups": [],
10+
"collapse-display": true,
11+
"showArrow": false,
12+
"textFadeMultiplier": 0,
13+
"nodeSizeMultiplier": 1,
14+
"lineSizeMultiplier": 1,
15+
"collapse-forces": true,
16+
"centerStrength": 0.518713248970312,
17+
"repelStrength": 10,
18+
"linkStrength": 1,
19+
"linkDistance": 250,
20+
"scale": 1.053497942386847,
21+
"close": true
22+
}

lvm/lvm-docs/.obsidian/plugins/cmdr/main.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)