Skip to content

Commit

Permalink
docs: update README to include detail about build util
Browse files Browse the repository at this point in the history
  • Loading branch information
nilslice committed Mar 12, 2024
1 parent 00f962e commit cbdcdd1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ zig fetch --save https://github.com/extism/zig-sdk/archive/<git-ref-here>.tar.gz

And in your `build.zig`:
```zig
const extism_module = b.dependency("extism", .{ .target = target, .optimize = optimize }).module("extism");
exe.root_module.addImport("extism", extism_module);
// TODO: make this easier to install
// add the shared library & header
exe.linkLibC();
exe.addIncludePath(.{ .path = "/usr/local/include" });
exe.addLibraryPath(.{ .path = "/usr/local/lib" });
exe.linkSystemLibrary("extism");
// to use the build script util, import extism:
const extism = @import("extism");
// inside your `build` function, after you've created tests or an executable step:
extism.addLibrary(exe, b);
```

## Getting Started
Expand Down

0 comments on commit cbdcdd1

Please sign in to comment.