8000 update: add cmd in readme to save dependency in zon file by amoghyermalkar123 · Pull Request #165 · mitchellh/libxev · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

update: add cmd in readme to save dependency in zon file #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
8000 Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions README.md
94FE
Original file line number Diff line number Diff line change
Expand Up @@ -188,26 +188,19 @@ int main(void) {
using the C API to libxev, see the "Build" section.

This package works with the Zig package manager introduced in Zig 0.11.
Create a `build.zig.zon` file like this:
Run this command to fetch the latest SHA for the package, it will automatically
save it in the `build.zig.zon` file.

```zig
.{
.name = "my-project",
.version = "0.0.0",
.dependencies = .{
.libxev = .{
.url = "https://github.com/mitchellh/libxev/archive/<git-ref-here>.tar.gz",
.hash = "12208070233b17de6be05e32af096a6760682b48598323234824def41789e993432c",
},
},
}

```bash
zig fetch --save https://github.com/mitchellh/libxev/archive/<git-ref-here>.tar.gz
```

And in your `build.zig`:

```zig
const xev = b.dependency("libxev", .{ .target = target, .optimize = optimize });
exe.addModule("xev", xev.module("xev"));
exe.root_module.addImport("xev", xev.module("xev"));
```

## Documentation
Expand Down
0