@thi.ng/wasm-api
Advanced tools
Comparing version 1.1.1 to 1.2.0
# Change Log | ||
- **Last updated**: 2022-11-30T22:27:37Z | ||
- **Last updated**: 2022-12-01T18:02:30Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -12,2 +12,8 @@ | ||
## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@1.2.0) (2022-12-01) | ||
#### 🚀 Features | ||
- add build script for user projects ([7164f5e](https://github.com/thi-ng/umbrella/commit/7164f5e)) | ||
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@1.1.0) (2022-11-28) | ||
@@ -14,0 +20,0 @@ |
{ | ||
"name": "@thi.ng/wasm-api", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects", | ||
@@ -113,3 +113,3 @@ "type": "module", | ||
}, | ||
"gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n" | ||
"gitHead": "199dcde33bf3d0b0bbd205d3b870dff43b735b22\n" | ||
} |
@@ -14,3 +14,2 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
- [Custom API modules](#custom-api-modules) | ||
- [Building Zig projects with these hybrid API modules](#building-zig-projects-with-these-hybrid-api-modules) | ||
- [String handling](#string-handling) | ||
@@ -20,2 +19,4 @@ - [Memory allocations](#memory-allocations) | ||
- [Object indices & handles](#object-indices--handles) | ||
- [Using the Zig build system](#using-the-zig-build-system) | ||
- [Naming & structural conventions](#naming--structural-conventions) | ||
- [Status](#status) | ||
@@ -60,3 +61,5 @@ - [Support packages](#support-packages) | ||
by this package | ||
7. Extensible shared [datatype code generator | ||
7. [Zig build files]() to simplify using hybrid TS/Zig packages with the | ||
built-in build system | ||
8. Extensible shared [datatype code generator | ||
infrastructure](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-bindgen/) | ||
@@ -67,3 +70,3 @@ for (currently) Zig & TypeScript and C11. For TS fully type checked and | ||
only bindings for these mentioned langs are included. | ||
8. [CLI | ||
9. [CLI | ||
frontend/utility](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-bindgen/README.md#cli-generator) | ||
@@ -172,15 +175,2 @@ for the code generator(s) | ||
### Building Zig projects with these hybrid API modules | ||
Some example projects (see [list below](#usage-examples)) provide custom | ||
[`build.zig`](https://github.com/thi-ng/umbrella/blob/develop/examples/zig-canvas/build.zig) | ||
& | ||
[`npm.zig`](https://github.com/thi-ng/umbrella/blob/develop/examples/zig-canvas/npm.zig) | ||
build scripts to easily integrate these hybrid TS/Zig packages into users' | ||
development processes. | ||
To avoid guesswork about the internals of these API modules, all of them are | ||
using an overall uniform structure, with the main Zig entry point in | ||
`/zig/lib.zig`... | ||
## String handling | ||
@@ -321,2 +311,34 @@ | ||
## Using the Zig build system | ||
This package provides utilities to simplify using hybrid TS/Zig WASM API modules which are distributed as NPM packages. Using these utils, a build file for Zig's built-in build system is as simple as: | ||
```zig | ||
const std = @import("std"); | ||
pub fn build(b: *std.build.Builder) void { | ||
@import("node_modules/@thi.ng/wasm-api/zig/build.zig").wasmLib(b, .{ | ||
// Declare extra WASM API packages to use | ||
// Each package can also declare its dependencies | ||
.packages = &.{ | ||
.{ .id = "wasm-api-dom", .path = "@thi.ng/wasm-api-dom/zig/lib.zig" }, | ||
.{ .id = "wasm-api-schedule", .path = "@thi.ng/wasm-api-schedule/zig/lib.zig" }, | ||
}, | ||
// (optional) build mode override | ||
.mode = .ReleaseSmall, | ||
}).install(); | ||
} | ||
``` | ||
All bundled example projects (see [list below](#usage-examples)) are being built | ||
via this script. **Please find more details/options in the commented source | ||
code:** | ||
[`/zig/build.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/build.zig) | ||
## Naming & structural conventions | ||
To avoid guesswork about the internals of any of the supplied WASM API modules, | ||
please also consult the information in | ||
[#368](https://github.com/thi-ng/umbrella/issues/368). | ||
## Status | ||
@@ -323,0 +345,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131467
20
529