Zig build for https://orca-app.dev
This build script exposes a addApp
function that Orca application developers can use to compile, link and bundle their applications.
Usage example:
const std = @import("std");
const orca_build = @import("orca");
pub fn build(b: *std.build.Builder) void {
const optimize = b.standardOptimizeOption(.{});
const orca_dep = b.dependency("orca", .{});
const app = orca_build.addApp(b, orca_dep, .{
.name = "UIZ",
.resource_dir = .{ .path = "data" },
.optimize = optimize,
.root_source_file = .{ .path = "src/main.zig" },
});
b.installDirectory(.{
.source_dir = app,
.install_dir = .prefix,
.install_subdir = "",
});
}
See https://github.com/kristoff-it/orca-ui-hello-zig for a complete example that depends on this repository.
Running zig build
will produce the runtime assets which can then be used via other build scripts.
xcrun
(for compiling metal shaders)- Python (used by orca's own build scripts that we currently still use, see relative TODO bullet point)
- Implement the missing bundling features (eg adding icons), the current code only implements what's required to make Orca's UI sample work (contributor friendly).
- Implement support for Windows (current code is macOS only).
- Remove the python dependency by implementing the same logic as part of the build script.
- Add support for having the application be implemented in C (super contributor friendly)
- Add support for linking and bundling directly a wasm binary built via a separate build system (super contributor friendly).