-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add support for C source files to Project (#98)
Add direct C support to `Build.Project`. This allows one to mix existing C code with new Zig code when writing a Zig based extension. Example usage: ``` var proj = PGBuild.Project.init(b, .{ .name = "my_extension", .version = .{ .major = 0, .minor = 1 }, .root_dir = "./src", }); proj.addIncludePath(b.path("path/to/c/include")); proj.addCSourceFiles(.{ .files = &[_][]const u8{ "path/to/c/code.c", }, }); ``` The C configuration will be applied to the shared library build by the project.
- Loading branch information
Showing
1 changed file
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters