-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Sanchez
committed
Sep 8, 2023
1 parent
7b7895e
commit 4655b12
Showing
7 changed files
with
33 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
c_wefx/ | ||
zig-cache/ | ||
zig-out/ | ||
*.o |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
const std = @import("std"); | ||
|
||
pub fn build(b: *std.build.Builder) void { | ||
// Adds the option -Drelease=[bool] to create a release build, which by | ||
// default we set to ReleaseSmall. | ||
b.setPreferredReleaseMode(.ReleaseSmall); | ||
// Standard release options allow the person running `zig build` to select | ||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. | ||
const mode = b.standardReleaseOptions(); | ||
const wefx_module = b.addModule("WEFX", .{ | ||
.source_file = .{ .cwd_relative = "wefx/WEFX.zig" }, | ||
}); | ||
|
||
// EXAMPLES | ||
const lib = b.addSharedLibrary("wefx", "examples/example1.zig", .unversioned); | ||
lib.setBuildMode(mode); | ||
lib.setTarget(.{ | ||
.cpu_arch = .wasm32, | ||
.os_tag = .freestanding, | ||
//.abi = .musl, | ||
const lib = b.addSharedLibrary(.{ | ||
.name = "wefx-example", | ||
.root_source_file = .{ .path = "examples/example1.zig" }, | ||
.target = .{ | ||
.cpu_arch = .wasm32, | ||
.os_tag = .freestanding, | ||
}, | ||
.optimize = .ReleaseSmall, | ||
}); | ||
lib.addPackagePath("WEFX", "./wefx/WEFX.zig"); | ||
lib.setOutputDir("./docs/"); | ||
lib.install(); | ||
lib.rdynamic = true; | ||
lib.addModule("WEFX", wefx_module); | ||
b.installArtifact(lib); | ||
} |
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
Binary file not shown.
Binary file not shown.
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
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