docs: update prebuilt targets list

This commit is contained in:
Nurul Huda (Apon) 2026-03-14 17:00:39 +06:00
parent f73ab73e16
commit 5f0819c5bd
No known key found for this signature in database
GPG key ID: 5D3F1DE2855A2F79
4 changed files with 18 additions and 16 deletions

View file

@ -1,4 +1,4 @@
name: Release Package Artifacts
name: Release
on:
push:

View file

@ -11,13 +11,13 @@ Temporalz provides Zig bindings to the Rust-based [temporal_rs](https://github.c
#### Prerequisites
- Zig 0.16.0-dev.2860+9c5460316 or later
- Zig 0.16.0-dev.2860+9c5460316
- Rust toolchain (only required if [prebuilt staticlibs](#prebuilt) are not available for your platform)
#### Add as a Dependency
```bash
zig fetch --save https://github.com/nurulhudaapon/temporalz/archive/main.tar.gz
zig fetch --save git+https://github.com/nurulhudaapon/temporalz.git
```
#### Use in build.zig
@ -53,13 +53,18 @@ exe.root_module.addImport("temporalz", temporalz.module("temporalz"));
Prebuilt libraries are included for the following platforms:
- `aarch64-macos`
- `x86_64-macos`
- `aarch64-linux-gnu`
- `aarch64-macos`
- `x86_64-linux-gnu`
- `aarch64-linux-gnu`
- `x86_64-windows-gnu`
- `aarch64-windows-gnu`
- `wasm32-freestanding`
- `wasm32-wasi`
- `x86_64-linux-musl`
- `aarch64-linux-musl`
- `aarch64-linux-android`
- `aarch64-ios`
For other platforms, the library will build from source; you need the Rust toolchain installed.

View file

@ -21,7 +21,7 @@ pub fn build(b: *std.Build) !void {
mod.addIncludePath(temporal_rs_git.path("temporal_capi/bindings/c"));
// -- Pre-built library support for temporal_capi --- //
const libtemporal = b.lazyDependency("libtemporal", .{});
const libtemporal_prebuilt = b.lazyDependency("libtemporal_prebuilt", .{});
// --- Rust C ABI: Library --- //
{
@ -42,7 +42,7 @@ pub fn build(b: *std.Build) !void {
const prebuilt_lib_path = b.fmt("{s}/{s}", .{ target_triple, lib_name });
var prebuilt_lib_file: ?std.Build.LazyPath = null;
if (libtemporal) |dep| {
if (libtemporal_prebuilt) |dep| {
const lib_file_candidate = dep.path(prebuilt_lib_path);
const lib_full_path = lib_file_candidate.getPath(b);
if (std.Io.Dir.cwd().openFile(b.graph.io, lib_full_path, .{})) |lib_check_file| {
@ -53,17 +53,14 @@ pub fn build(b: *std.Build) !void {
if (prebuilt_lib_file) |lib_file| {
// Use pre-built library (no Rust compiler needed)
std.debug.print("Using pre-built temporal_capi library from downloaded artifact at: {s}\n", .{prebuilt_lib_path});
mod.addObjectFile(lib_file);
} else {
std.debug.print("building from source: {s}\n", .{prebuilt_lib_path});
// Build from source using the local temporal-rs package
const temporal_rs_local = b.dependency("temporal_rs_local", .{
const libtemporal_src = b.dependency("libtemporal_src", .{
.target = target,
.optimize = optimize,
});
mod.addImport("temporal_rs", temporal_rs_local.module("temporal_rs"));
mod.addImport("temporal_rs", libtemporal_src.module("temporal_rs"));
}
// --- Rust Misc Deps --- //

View file

@ -8,12 +8,12 @@
.url = "git+https://github.com/boa-dev/temporal#v0.1.2",
.hash = "N-V-__8AANlkNAB77Z946lqp-lgp2qSsOBDADValZC86PhB-",
},
.temporal_rs_local = .{
.libtemporal_src = .{
.path = "pkg/temporal-rs",
},
.libtemporal = .{
.url = "https://github.com/nurulhudaapon/temporalz/releases/download/v0.0.1/temporal-rs-libs.tar.gz",
.hash = "N-V-__8AAPJZzwPipYB8PoJ0LhTO9ipHbtbXbTfRuSYbJFtD",
.libtemporal_prebuilt = .{
.url = "https://github.com/nurulhudaapon/temporalz/releases/download/v0.1.2/temporal-rs-libs.tar.gz",
.hash = "N-V-__8AALzG2AXNSf7E7iuZWx7SrTN0PICWYwnu2kIDlf-w",
},
},
.paths = .{