You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make on your project build.zig & build.zig.zon file
e.g:
build.zig
constasio_dep=b.dependency("asio", .{ // <== as declared in build.zig.zon
.target=target, // the same as passing `-Dtarget=<...>` to the library's build.zig script
.optimize=optimize, // ditto for `-Doptimize=<...>`
});
constlibasio=asio_dep.artifact("asio"); // <== has the location of the dependency files (asio)/// your executable configexe.linkLibrary(libasio); // <== link libasioexe.installLibraryHeaders(libasio); // <== get copy asio headers to zig-out/include
build.zig.zon
# '--save=asio': (over)write latest git commit (no need manually update)
$ zig fetch --save=asio git+https://github.com/kassane/asio
# zig project helper
Project-Specific Options:
-Dtarget=[string] The CPU architecture, OS, and ABI to build for
-Dcpu=[string] Target CPU features to add or subtract
-Ddynamic-linker=[string] Path to interpreter on the target system
-Doptimize=[enum] Prioritize performance, safety, or binary size
Supported Values:
Debug
ReleaseSafe
ReleaseFast
ReleaseSmall
-DShared=[bool] Build the Shared Library (default: false)
-DSSL=[bool] Build Asio with OpenSSL support (default: false)
-DTests=[bool] Build tests (default: false)