File tree Expand file tree Collapse file tree 2 files changed +244
-98
lines changed Expand file tree Collapse file tree 2 files changed +244
-98
lines changed Original file line number Diff line number Diff line change 1
1
# boost-libraries-zig
2
2
3
- Boost Libraries using ` build.zig `
3
+ [ Boost Libraries] ( https://boost.io ) using ` build.zig ` .
4
+
5
+ Replacing the [ CMake] ( https://cmake.org/ ) and [ B2] ( https://www.boost.org/doc/libs/1_86_0/more/getting_started/index.html ) build system.
4
6
5
7
### Requirements
6
8
7
9
- [ zig] ( https://ziglang.org/download ) v0.13.0 or master
8
10
9
11
## How to use
10
12
13
+ Build libraries
14
+
15
+ ``` bash
16
+ # Build no-header-only libraries
17
+ $ zig build -Doptimize=< Debug| ReleaseSafe| ReleaseFast| ReleaseSmall> -Dtarget=< triple-target> --summary < all| new> -Dcontext -Djson -Dsystem -Dcontainer -Dcobalt -Dfilesystem -Dheaders-only=false
18
+ ```
19
+
20
+ #### Helper
21
+
22
+ ``` bash
23
+ Project-Specific Options:
24
+ -Dtarget=[string] The CPU architecture, OS, and ABI to build for
25
+ -Dcpu=[string] Target CPU features to add or subtract
26
+ -Ddynamic-linker=[string] Path to interpreter on the target system
27
+ -Doptimize=[enum] Prioritize performance, safety, or binary size
28
+ Supported Values:
29
+ Debug
30
+ ReleaseSafe
31
+ ReleaseFast
32
+ ReleaseSmall
33
+ -Dheaders-only=[bool] Use headers-only libraries (default: true)
34
+ -Dcobalt=[bool] Build cobalt library (default: false)
35
+ -Dcontext=[bool] Build context library (default: false)
36
+ -Djson=[bool] Build json library (default: false)
37
+ -Dcontainer=[bool] Build container library (default: false)
38
+ -Dfilesystem=[bool] Build filesystem library (default: false)
39
+ -Dcoroutine2=[bool] Build coroutine2 library (default: false)
40
+ -Dsystem=[bool] Build system library (default: false)
41
+ -Dshared=[bool] Build as shared library (default: false)
42
+ ```
43
+
44
+
45
+ ### or use in new zig project
46
+
11
47
Make directory and init
12
48
13
49
``` bash
You can’t perform that action at this time.
0 commit comments