Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
travisstaloch committed Sep 30, 2024
1 parent be8fc9b commit 40446f6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ gen/People/Person.fb.zig
```

You can now import these files into your zig application. The compiled .fb.zig
files depend on a "flatbufferz" module which can be provided by:
files depend on a "flatbufferz" module which can be provided by running:
```console
zig fetch --save=flatbufferz https://github.com/travisstaloch/flatbufferz/archive/be8fc9bfdfe416fe5b2ce24ed8f0e16700c103fb.tar.gz
```
That will add a dependency to your build.zig.zon:
```zig
// build.zig.zon
.{
Expand All @@ -56,7 +60,7 @@ files depend on a "flatbufferz" module which can be provided by:
.dependencies = .{
.flatbufferz = .{
// note: you may need to change this url commit hash
.url = "https://github.com/travisstaloch/flatbufferz/archive/f8c035f29893a2b30902ed61b0d8702e8f52f435.tar.gz",
.url = "https://github.com/travisstaloch/flatbufferz/archive/be8fc9bfdfe416fe5b2ce24ed8f0e16700c103fb.tar.gz",
},
}
}
Expand All @@ -73,6 +77,10 @@ const flatbufferz_mod = flatbufferz_dep.module("flatbufferz");
my_exe.addModule("flatbufferz", flatbufferz_mod);
```

# Gen Step
To generate code in your build.zig see the example in (#18)[https://github.com/travisstaloch/flatbufferz/pull/18].


# Tools
Convert .bfbs to .fbs.
```console
Expand Down

0 comments on commit 40446f6

Please sign in to comment.