Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
f684e66
create develop :dog:
laohanlinux May 14, 2023
00713d2
add node.zig :dog:
laohanlinux May 14, 2023
6034a51
add node.zig :dog:
laohanlinux Jun 17, 2023
05996da
add node.zig :dog:
laohanlinux Jun 17, 2023
66ff65d
laohanlinux May 12, 2024
f039548
:cat:
May 13, 2024
dd44d34
:volcano:
laohanlinux May 13, 2024
6d36671
:cat:
May 14, 2024
11e5b4f
:cat:
May 14, 2024
1ec0d6d
:cat:
May 14, 2024
879ace3
:dog:
Jun 13, 2024
9496184
:dog:
Jun 13, 2024
b602fab
:dog:
Jun 13, 2024
5a9cae9
:dog: duck
Jun 13, 2024
5df9e8b
:dog:
Jun 13, 2024
0b27b55
:dog:
Jun 13, 2024
73e7e9c
:cat:
laohanlinux Jun 13, 2024
3754287
:dog:
Jun 14, 2024
74286a4
:cat:
laohanlinux Jun 16, 2024
1c57de8
:dog:
Jun 17, 2024
da0273f
TO_AQUAMAN Opz code
Jun 18, 2024
7099b14
:cat:
laohanlinux Jun 18, 2024
52f42ed
:dog:
Jun 19, 2024
81f4dbe
:cat:
Jun 21, 2024
c8d2ba9
:cat:
laohanlinux Jun 24, 2024
f80f0d1
:cat:
Jun 25, 2024
b40e8fa
:cat:
Jun 26, 2024
f314ec2
:cat:
Jun 26, 2024
0b126d7
:cat:
Jul 1, 2024
fcbfd64
:cat:
laohanlinux Jul 1, 2024
56962d0
:cat:
Jul 5, 2024
eeda27d
:cat:
laohanlinux Jul 7, 2024
3be346b
:cat:
laohanlinux Jul 8, 2024
fb90727
:cat
laohanlinux Jul 10, 2024
3fea77e
:cat:
Jul 11, 2024
bcfb47e
:cat:
laohanlinux Jul 11, 2024
06e4e1b
:cat:
laohanlinux Jul 14, 2024
86583da
:dog:
Jul 15, 2024
296803e
:dog:
Jul 16, 2024
0f8c090
:dog:
Jul 17, 2024
a4f960c
:dog:
Jul 18, 2024
c3b767d
:cat:
laohanlinux Jul 18, 2024
ee2f741
:cat:
laohanlinux Jul 18, 2024
95a514c
:dog:
Jul 19, 2024
dab8223
:cat:
laohanlinux Jul 21, 2024
5168741
:cat:
Jul 23, 2024
7ac424d
:car:
laohanlinux Jul 23, 2024
bc42c53
:cat:
Jul 24, 2024
df47dd0
:tiger:
laohanlinux Jul 24, 2024
b082a23
:dog:
Jul 25, 2024
2a50bae
:dog:
Jul 25, 2024
4648d1a
:dog:
Jul 26, 2024
c189615
:dog:
Jul 29, 2024
c69309f
:cat:
laohanlinux Jul 29, 2024
e373dfc
:cat:
Jul 30, 2024
aa4384e
:cat:
laohanlinux Jul 30, 2024
8ce4406
:cat:
Jul 31, 2024
2e65489
:dog:
Aug 1, 2024
6ff6bd5
:cat:
laohanlinux Aug 1, 2024
3dae50b
:cat:
Aug 4, 2024
e1f6b00
:cat:
laohanlinux Aug 5, 2024
4d0a91f
:dog:
Aug 8, 2024
7b23e99
:dog:
laohanlinux Aug 8, 2024
2826590
:dog:
Aug 9, 2024
fea276d
:dog:
Aug 12, 2024
87f3d5f
:cat:
Aug 12, 2024
01805df
:car:
laohanlinux Aug 12, 2024
b5384f7
:dog:
Aug 13, 2024
d515c87
:dog:
laohanlinux Aug 13, 2024
5626a28
:dog:
Aug 14, 2024
5887e1c
:dog:
laohanlinux Aug 15, 2024
711f2cb
:dog:
laohanlinux Aug 15, 2024
d26a5f2
:cat:
laohanlinux Aug 16, 2024
7a6e801
:dog:
laohanlinux Aug 16, 2024
d836539
:dog:
laohanlinux Aug 18, 2024
1fdeaaf
:dog:
laohanlinux Aug 19, 2024
2f9d031
:dog:
laohanlinux Aug 19, 2024
d6e8b46
:cat:
laohanlinux Aug 20, 2024
218de40
:dog:
laohanlinux Aug 21, 2024
527520f
:dog:
laohanlinux Aug 22, 2024
d4da787
:dog:
laohanlinux Sep 2, 2024
47b8924
:dog:
laohanlinux Sep 2, 2024
0006907
:cat:
laohanlinux Sep 3, 2024
de5e986
:dog: :dog:
laohanlinux Sep 3, 2024
2806814
:dog:
laohanlinux Sep 3, 2024
958a9c1
add BufStr
laohanlinux Sep 4, 2024
a285a55
:cat:
laohanlinux Sep 4, 2024
0ee7952
:dog:
laohanlinux Sep 4, 2024
4c7d4d1
:fish:
laohanlinux Sep 6, 2024
5a0259f
:cat: :fish:
laohanlinux Sep 7, 2024
183a3fc
:fish:
laohanlinux Sep 7, 2024
4071c68
:dog:
laohanlinux Sep 9, 2024
36e7cea
:cat:
laohanlinux Sep 9, 2024
1b2c709
:dog:
laohanlinux Sep 19, 2024
d156e23
:fix
laohanlinux Sep 19, 2024
bdee879
:cat:
laohanlinux Sep 23, 2024
e181d9d
:cat:
laohanlinux Sep 23, 2024
0858a24
:dog:
laohanlinux Sep 25, 2024
8370d60
:cat:
laohanlinux Sep 25, 2024
07b9521
:cat:
laohanlinux Sep 26, 2024
3d498dc
:disappointed:
laohanlinux Sep 26, 2024
18970d0
:dog:
laohanlinux Sep 27, 2024
ccdb664
:cat:
laohanlinux Sep 28, 2024
6a8f939
Code ..
laohanlinux Sep 29, 2024
d322b99
Code ..
laohanlinux Sep 29, 2024
528821c
Fix sort
laohanlinux Sep 29, 2024
c973ebe
Fix sort
laohanlinux Sep 29, 2024
02019d3
Opz code
laohanlinux Sep 29, 2024
07389c3
:cat:
laohanlinux Sep 29, 2024
c402774
:ab:
laohanlinux Sep 29, 2024
0ec42dc
:cat:
laohanlinux Sep 30, 2024
fe60d86
:cat:
laohanlinux Oct 3, 2024
a91eb51
:dog:
laohanlinux Oct 3, 2024
516712c
:dog:
laohanlinux Oct 3, 2024
88d85b2
:dog:
laohanlinux Oct 4, 2024
4f487b6
:dog:
laohanlinux Oct 4, 2024
03d89d0
:dog:
laohanlinux Oct 4, 2024
9701e1a
:dog:
laohanlinux Oct 5, 2024
1c4c345
:dog:
laohanlinux Oct 6, 2024
5623e9d
:dog:
laohanlinux Oct 6, 2024
8aac6a6
:dog:
laohanlinux Oct 8, 2024
6672506
:dog:
laohanlinux Oct 8, 2024
863c0b5
:cat:
laohanlinux Oct 8, 2024
250795b
:+1:
laohanlinux Oct 8, 2024
9bc83b6
:fish:
laohanlinux Oct 9, 2024
ff1cfd4
:dog:
laohanlinux Oct 9, 2024
49f8e5e
:dog:
laohanlinux Oct 10, 2024
6772428
:cat:
laohanlinux Oct 10, 2024
c7bfdf3
:bit:
laohanlinux Oct 10, 2024
58189ed
:dog:
laohanlinux Oct 10, 2024
50dd183
:cat:
laohanlinux Oct 11, 2024
4f992d8
:cat:
laohanlinux Oct 11, 2024
90723f8
:cat:
laohanlinux Oct 14, 2024
06a7c84
:cat:
laohanlinux Oct 14, 2024
72a7f45
:cat:
laohanlinux Oct 14, 2024
bdf32a1
:coffee:
laohanlinux Oct 14, 2024
84060e8
:dog:
laohanlinux Oct 15, 2024
a34efbf
:dog:
laohanlinux Oct 15, 2024
228b311
:cactus:
laohanlinux Oct 15, 2024
773dcd3
:dog:
laohanlinux Oct 16, 2024
127f3de
init
laohanlinux Oct 16, 2024
edbc6a4
init
laohanlinux Oct 16, 2024
108a6ea
:cow:
laohanlinux Oct 16, 2024
439cd8b
:cat:
laohanlinux Oct 17, 2024
fea450e
:football:
laohanlinux Oct 17, 2024
8a99fbf
:dog:
laohanlinux Oct 18, 2024
42d634b
:cat: add Cursor_QuickCheck
laohanlinux Oct 21, 2024
7b1a263
:cat: add Cursor_QuickCheck_Reverse
laohanlinux Oct 21, 2024
f7779f1
:cat: add Cursor_QuickCheck_BucketsOnly
laohanlinux Oct 21, 2024
deda2d8
:cat: add // Ensure that a Tx cursor can reverse iterate over subbuck…
laohanlinux Oct 21, 2024
7d014e6
:cat: add Cursor_QuickCheck_Reverse
laohanlinux Oct 21, 2024
8d4bd21
:cat: fix compiled
laohanlinux Oct 21, 2024
cd77886
update zig
laohanlinux Oct 21, 2024
e24f206
update zig
laohanlinux Oct 21, 2024
4926174
add test
laohanlinux Oct 21, 2024
a1b54c2
:cat: fix compiled
laohanlinux Oct 21, 2024
3fd3b64
Merge branch 'main' into develop
laohanlinux Oct 21, 2024
773cd88
Merge branch 'main' into develop
laohanlinux Oct 21, 2024
05f5c69
:+1:
laohanlinux Oct 21, 2024
8dfd3df
:dog:
laohanlinux Oct 22, 2024
6b06c97
:cat:
laohanlinux Oct 23, 2024
619e18c
init
laohanlinux Oct 24, 2024
e11f64a
:dog:
laohanlinux Oct 24, 2024
9b6f124
:dog:
laohanlinux Oct 25, 2024
fead59b
:dog: fix inline bucket root, Yes!!!
laohanlinux Oct 30, 2024
56d5318
:dog: ...
laohanlinux Oct 30, 2024
9df9d2d
:dog: fix inline bucket root, Yes!!!
laohanlinux Oct 31, 2024
b35ab38
:dog: fix inline bucket root, Yes!!!
laohanlinux Oct 31, 2024
42bd7a5
:dog: fix inline bucket root, Yes!!!
laohanlinux Oct 31, 2024
5aa8639
:dog:
laohanlinux Oct 31, 2024
796aa50
:dog:
laohanlinux Oct 31, 2024
aa124de
:dog:
laohanlinux Nov 1, 2024
c18a65f
:dog:
laohanlinux Nov 4, 2024
0b0816d
:fix: cache
laohanlinux Nov 4, 2024
9109ba1
:dog:
laohanlinux Nov 4, 2024
ef1642c
:dog:
laohanlinux Nov 4, 2024
996baf3
:dog:
laohanlinux Nov 4, 2024
96df3b0
:coffee:
laohanlinux Nov 6, 2024
df13ac1
add readme
laohanlinux Nov 8, 2024
6032bad
add readme
laohanlinux Nov 8, 2024
df56f26
:coffe:
laohanlinux Nov 8, 2024
c02deab
:coffe:
laohanlinux Nov 11, 2024
9a4fd34
fix mustCheck
laohanlinux Nov 11, 2024
5c71344
:hi:
laohanlinux Nov 12, 2024
6d3e38b
:hi:
laohanlinux Nov 13, 2024
12921c2
:hi: add log.zig
laohanlinux Nov 13, 2024
7ffa6f7
:hi:
laohanlinux Nov 14, 2024
02e80dc
add example
laohanlinux Nov 18, 2024
75fa455
add tx_test.zig
laohanlinux Nov 27, 2024
838ae24
:ok:
laohanlinux Nov 29, 2024
627f3fd
:cat:
laohanlinux Dec 4, 2024
914e922
:dog:
Dec 25, 2024
4415cf8
🐕
Dec 26, 2024
ddb71e7
🐟
Dec 26, 2024
0663e7c
:duck:
Jan 3, 2025
25a131e
:cat:
Jan 8, 2025
7579e56
👎
Jan 9, 2025
2fe83ee
:
Jan 9, 2025
53b357d
👎
Jan 9, 2025
b57e4db
:cat:
Jan 9, 2025
b64a6fc
:cat:
Jan 9, 2025
e36401a
:cat:
Jan 9, 2025
acd2034
:cat:
Jan 9, 2025
0df4c6e
:cat:
Jan 9, 2025
5f193dc
:cat:
Jan 9, 2025
0d7676b
:cat:
Jan 9, 2025
7b2da21
👎
Jan 13, 2025
4e8e5c6
🚗
Jan 13, 2025
f8a45db
Jan 13, 2025
007cfe7
:cat:
Jan 13, 2025
b6196e2
:cat:
Jan 13, 2025
e2211ea
:cat:
Jan 13, 2025
9c574d8
:cat:
Jan 13, 2025
91c3387
:cat:
Jan 13, 2025
a3d5ba2
:cat:
Jan 13, 2025
7b96ae7
:cat:
Jan 13, 2025
f2ae8cd
:cat:
Jan 14, 2025
7bc6e87
:cat:
Jan 14, 2025
18eb3b2
:cat:
Jan 14, 2025
03710e9
:cat:
Jan 14, 2025
9138c9b
:cat:
Jan 14, 2025
470c6d3
:cat:
Jan 14, 2025
9e3a77d
:cat:
Jan 14, 2025
cb737b0
stable
Jan 16, 2025
b70163c
stable
Jan 16, 2025
368c042
stable
Jan 16, 2025
8127e51
stable
Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ jobs:

- name: Install Zig
run: |
wget https://ziglang.org/builds/zig-linux-x86_64-0.14.0-dev.1951+857383689.tar.xz
tar -xf zig-linux-x86_64-0.14.0-dev.1951+857383689.tar.xz
sudo mv zig-linux-x86_64-0.14.0-dev.1951+857383689 $HOME/zig
wget https://ziglang.org/builds/zig-linux-x86_64-0.14.0-dev.2643+fb43e91b2.tar.xz
tar -xf zig-linux-x86_64-0.14.0-dev.2643+fb43e91b2.tar.xz
sudo mv zig-linux-x86_64-0.14.0-dev.2643+fb43e91b2 $HOME/zig
$HOME/zig/zig version

- name: Build and test
run: |
mkdir dirty
$HOME/zig/zig build
$HOME/zig/zig build test
$HOME/zig/zig test src/cursor_test.zig
$HOME/zig/zig test src/root.zig
54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,53 @@
# boltdb-zig
# boltdb-zig

A pure Zig implementation of BoltDB, an embedded key/value database.

## Overview

boltdb-zig is a Zig port of the original [BoltDB](https://github.com/boltdb/bolt), which is a simple yet powerful embedded key/value database written in Go. It provides a consistent and ACID-compliant data store with the following features:

- Pure Zig implementation
- Single file backend
- ACID transactions
- Lock-free MVCC
- Nested buckets

## Status

🚧 This project is currently under development.

## Usage

```zig
# zig fetch --save git+https://github.com/laohanlinux/boltdb-zig.git
```

import the library in your build.zig.zon file: [link](example/build.zig.zon)

```
const boltdbDep = b.dependency("boltdb-zig", .{
.target = target,
.optimize = optimize,
});

const exe = b.addExecutable(.{
.name = "example",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});

exe.root_module.addImport("boltdb", boltdbDep.module("boltdb"));
```

How use?
[link](example/src/main.zig)

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Acknowledgments

- Original [BoltDB](https://github.com/boltdb/bolt)

2 changes: 1 addition & 1 deletion book/Untitled.tldr

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions book/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,73 @@ func (b *Bucket) write() []byte {
|bucketHeader|page|
```

## 事务管理

### Example

- 初始化状态

```
tid = 10,
```

- 创建2个读事务

第一个读事务

```
tid = 10, // 读事务,不会递增事务id
ReadTxPtr = 0x100, // 读事务的指针
```

第二个读事务

```
tid = 10, // 读事务,不会递增事务id
ReadTxPtr = 0x101, // 读事务的指针
```

假设此时,他们都引用了同一个page,pid = 89

- 创建一个写事务

```
tid = 11,
WriteTxPtr = 0x102, // 写事务的指针
```

该事务也引用了同一个page,pid = 89。


*此时*,事务管理器中,有3个事务,2个读事务,1个写事务。

Bolt如何处理?

一种简单的解决办法是:
```
### Page生命周期管理

对于上述场景中的page 89,Bolt采用以下策略管理其生命周期:

1. **引用计数**
- 每个page维护内部引用计数
- 当前page 89有3个引用(2个读事务 + 1个写事务)
- 引用计数确保页面在仍被使用时不会被释放

2. **写时复制(Copy-on-Write)**
- 写事务修改page 89时会创建新副本
- 读事务继续使用原始page 89
- 写事务使用新的page副本
- 原始page 89会保留到所有读事务完成

3. **页面释放**
- 读事务完成时递减引用计数
- 只有引用计数为0时才释放页面
- 写事务提交后,新页面版本对后续事务可见

这种机制确保了:
- 读事务的数据一致性
- 写事务的隔离性
- 高效的内存管理
```

2 changes: 1 addition & 1 deletion book/无标题.tldr

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});

// Create module
_ = b.addModule("boltdb", .{
.root_source_file = b.path("src/namespace.zig"),
});

const lib = b.addStaticLibrary(.{
.name = "boltdb-zig",
// In this case the main source file is merely a path, however, in more
Expand All @@ -23,7 +28,6 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
});

// This declares intent for the library to be installed into the standard
// location when the user invokes the "install" step (the default step when
// running `zig build`).
Expand Down
42 changes: 0 additions & 42 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,6 @@
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
// .string = .{
// .url = "https://github.com/JakubSzark/zig-string/archive/refs/heads/master.tar.gz",
// .hash = "1220fc05a513524010e93b4734392c728d5364fb6669b33cec9dae7225d56a5eedde"
// //the correct hash will be suggested by zig
// }
// See `zig fetch --save <url>` for a command-line interface for adding dependencies.
//.example = .{
// // When updating this field to a new URL, be sure to delete the corresponding
// // `hash`, otherwise you are communicating that you expect to find the old hash at
// // the new URL.
// .url = "https://example.com/foo.tar.gz",
//
// // This is computed from the file contents of the directory of files that is
// // obtained after fetching `url` and applying the inclusion rules given by
// // `paths`.
// //
// // This field is the source of truth; packages do not come from a `url`; they
// // come from a `hash`. `url` is just one of many possible mirrors for how to
// // obtain a package matching this `hash`.
// //
// // Uses the [multihash](https://multiformats.io/multihash/) format.
// .hash = "...",
//
// // When this is provided, the package is found in a directory relative to the
// // build root. In this case the package's hash is irrelevant and therefore not
// // computed. This field and `url` are mutually exclusive.
// .path = "foo",

// // When this is set to `true`, a package is declared to be lazily
// // fetched. This makes the dependency only get fetched if it is
// // actually used.
// .lazy = false,
//},
},

// Specifies the set of files and directories that are included in this package.
// Only files and directories listed here are included in the `hash` that
// is computed for this package.
// Paths are relative to the build root. Use the empty string (`""`) to refer to
// the build root itself.
// A directory listed here means that all files within, recursively, are included.
.paths = .{
// This makes *all* files, recursively, included in this package. It is generally
// better to explicitly list the files and directories instead, to insure that
Expand Down
98 changes: 98 additions & 0 deletions example/build.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
const std = @import("std");

// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
// runner.
pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});

// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});

const lib = b.addStaticLibrary(.{
.name = "example",
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});

// This declares intent for the library to be installed into the standard
// location when the user invokes the "install" step (the default step when
// running `zig build`).
b.installArtifact(lib);
const boltdbDep = b.dependency("boltdb-zig", .{
.target = target,
.optimize = optimize,
});

const exe = b.addExecutable(.{
.name = "example",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});

exe.root_module.addImport("boltdb", boltdbDep.module("boltdb"));
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
// step when running `zig build`).
b.installArtifact(exe);

// This *creates* a Run step in the build graph, to be executed when another
// step is evaluated that depends on it. The next line below will establish
// such a dependency.
const run_cmd = b.addRunArtifact(exe);

// By making the run step depend on the install step, it will be run from the
// installation directory rather than directly from within the cache directory.
// This is not necessary, however, if the application depends on other installed
// files, this ensures they will be present and in the expected location.
run_cmd.step.dependOn(b.getInstallStep());

// This allows the user to pass arguments to the application in the build
// command itself, like this: `zig build run -- arg1 arg2 etc`
if (b.args) |args| {
run_cmd.addArgs(args);
}

// This creates a build step. It will be visible in the `zig build --help` menu,
// and can be selected like this: `zig build run`
// This will evaluate the `run` step rather than the default, which is "install".
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);

// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const lib_unit_tests = b.addTest(.{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
lib_unit_tests.root_module.addImport("boltdb", boltdbDep.module("boltdb"));

const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);

const exe_unit_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe_unit_tests.root_module.addImport("boltdb", boltdbDep.module("boltdb"));

const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);

// Similar to creating the run step earlier, this exposes a `test` step to
// the `zig build --help` menu, providing a way for the user to request
// running the unit tests.
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_lib_unit_tests.step);
test_step.dependOn(&run_exe_unit_tests.step);
}
39 changes: 39 additions & 0 deletions example/build.zig.zon
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.{
// This is the default name used by packages depending on this one. For
// example, when a user runs `zig fetch --save <url>`, this field is used
// as the key in the `dependencies` table. Although the user can choose a
// different name, most users will stick with this provided value.
//
// It is redundant to include "zig" in this name because it is already
// within the Zig package namespace.
.name = "example",

// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.0.0",

// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
//.minimum_zig_version = "0.11.0",

// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
.@"boltdb-zig" = .{
.url = "git+https://github.com/laohanlinux/boltdb-zig.git/?ref=align#f2ae8cd9a8d4396fec3fbbed3adbd9a14e0fa1a3",
.hash = "12203cc7a802ae6cd01c6b856ff96ddfe26cb9612533ca116a0e30178d5251e173bd",
},
},
.paths = .{
"build.zig",
"build.zig.zon",
"src",
// For example...
//"LICENSE",
//"README.md",
},
}
Loading
Loading