File tree Expand file tree Collapse file tree 6 files changed +537
-156
lines changed Expand file tree Collapse file tree 6 files changed +537
-156
lines changed Original file line number Diff line number Diff line change
1
+ * .zig text eol =lf
2
+ * .zon text eol =lf
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ build :
14
+ strategy :
15
+ fail-fast : false
16
+ matrix :
17
+ zig-version :
18
+ - 0.13.0
19
+ - master # Let's test master while it works so that breaking it is deliberate decision
20
+ os :
21
+ - ubuntu-latest
22
+ - macos-latest
23
+ - windows-latest
24
+ runs-on : ${{ matrix.os }}
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Setup Zig
30
+ uses : mlugg/setup-zig@v1
31
+ with :
32
+ version : ${{ matrix.zig-version }}
33
+
34
+ - name : Check Formatting
35
+ run : zig fmt --ast-check --check .
36
+
37
+ - name : Build
38
+ run : zig build --summary all
Original file line number Diff line number Diff line change 1
- zig-out / **
2
- zig-cache / **
3
- .zig-cache / **
1
+ zig-out
2
+ zig-cache
3
+ .zig-cache
Original file line number Diff line number Diff line change
1
+ [ ![ CI] ( https://github.com/allyourcodebase/capstone/actions/workflows/ci.yaml/badge.svg )] ( https://github.com/allyourcodebase/capstone/actions )
2
+
1
3
# capstone
2
- This just enables to use [ capstone] ( https://github.com/capstone-engine/capstone ) as a Dependency for the Zig build system.
4
+
5
+ This is [ capstone] ( https://github.com/capstone-engine/capstone ) , packaged for [ Zig] ( https://ziglang.org/ ) .
6
+
7
+ ## Installation
8
+
9
+ First, update your ` build.zig.zon ` :
10
+
11
+ ```
12
+ # Initialize a `zig build` project if you haven't already
13
+ zig init
14
+ zig fetch --save git+https://github.com/allyourcodebase/capstone.git#5.0.1
15
+ ```
16
+
17
+ You can then import ` capstone ` in your ` build.zig ` with:
18
+
19
+ ``` zig
20
+ const capstone_dependency = b.dependency("capstone", .{
21
+ .target = target,
22
+ .optimize = optimize,
23
+ });
24
+ your_exe.linkLibrary(capstone_dependency.artifact("capstone"));
25
+ ```
You can’t perform that action at this time.
0 commit comments