Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mlafeldt committed Jan 22, 2025
1 parent b81c0ee commit 38dc65e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The infamous [DuckDB quack extension](https://duckdb.org/community_extensions/ex

## Building the Extension

[Install Zig](https://ziglang.org/learn/getting-started/). That's it. No other dependencies are required.
Install [Zig](https://ziglang.org) and [uv](https://docs.astral.sh/uv/). That's it. No other dependencies are required.

Now experience the power of the [Zig Build System](https://ziglang.org/learn/build-system/) with these commands:

Expand Down Expand Up @@ -52,20 +52,30 @@ zig-out

See `zig build --help` for more options.

## Testing

Run the [SQL logic tests](https://duckdb.org/docs/dev/sqllogictest/intro.html) with `zig build test`.

```
❯ zig build test
[0/1] test/sql/quack.test
SUCCESS
```

## Using the Extension

```
❯ duckdb -unsigned
v1.1.3 19864453f7
Enter ".help" for usage hints.
🟡◗ LOAD 'zig-out/osx_arm64/quack.duckdb_extension';
🟡◗ SELECT quack('||| Arena');
┌────────────────────
│ quack('||| Arena') │
varchar
├────────────────────
│ Quack ||| Arena 🐥 │
└────────────────────
🟡◗ SELECT quack('Zig');
┌──────────────┐
│ quack('Zig') │
│ varchar │
├──────────────┤
│ Quack Zig 🐥 │
└──────────────┘
```

## Advanced: Creating an Extension Repository
Expand Down
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub fn build(b: *std.Build) !void {
cmd.addArg("--external-extension");
cmd.addFileArg(ext_path);

const test_step = b.step("test", "Run unit tests with sqllogictest");
const test_step = b.step("test", "Run SQL logic tests");
test_step.dependOn(&cmd.step);
}
}
Expand Down

0 comments on commit 38dc65e

Please sign in to comment.