Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thi.ng/wasm-api

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/wasm-api - npm Package Compare versions

Comparing version 0.17.2 to 0.17.3

zig/lib.zig

12

api.d.ts

@@ -56,3 +56,3 @@ import type { BigType, FloatType, Fn, Fn2, IDeref, ILength, IObjectOf, NumOrString } from "@thi.ng/api";

*
* Using the supplied Zig bindings (see `/zig/wasmapi.zig`), it's the
* Using the supplied Zig bindings (see `/zig/lib.zig`), it's the
* user's responsibility to define a public `WASM_ALLOCATOR` in the root

@@ -165,3 +165,3 @@ * source file to enable allocations, e.g. using the

* Core API of WASM imports defined by the {@link WasmBridge}. The same
* functions are declared as bindings in `/zig/wasmapi.zig`. **Also see this
* functions are declared as bindings in `/zig/lib.zig`. **Also see this
* file for documentation of each function...**

@@ -171,3 +171,3 @@ *

* Zig API:
* https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/wasmapi.zig
* https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/lib.zig
*/

@@ -464,4 +464,8 @@ export interface CoreAPI extends WebAssembly.ModuleImports {

/**
* If true (default), forces uppercase enum identifiers
* If true (default), forces uppercase enum identifiers.
*
* @remarks
* This option is ignored in {@link ZIG} since it's idiomatic for that
* language to only use lowercase/camelCase enum IDs.
*
* @defaultValue true

@@ -468,0 +472,0 @@ */

# Change Log
- **Last updated**: 2022-10-30T13:56:23Z
- **Last updated**: 2022-10-31T09:19:33Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -12,2 +12,11 @@

### [0.17.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.17.3) (2022-10-31)
#### ♻️ Refactoring
- restructure/rename zig files, update readdme ([c63ca10](https://github.com/thi-ng/umbrella/commit/c63ca10))
- enforce uniform project structure for all `[@thi.ng/wasm-api-](https://github.com/thi-ng/umbrella/tree/main/packages/wasm-api-)*` packages
- rename /zig/wasmapi.zig => /zig/lib.zig
- update readme w/ further info
### [0.17.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@0.17.1) (2022-10-30)

@@ -14,0 +23,0 @@

{
"name": "@thi.ng/wasm-api",
"version": "0.17.2",
"version": "0.17.3",
"description": "Generic, modular, extensible API bridge, polyglot glue code and bindings code generators for hybrid JS & WebAssembly projects",

@@ -144,3 +144,3 @@ "type": "module",

},
"gitHead": "ce7be1988e43f620b90a751f056d1a2326306ee4\n"
"gitHead": "7c5c0cb37ff88c2fa5dd77dd78bf3a5ceb5c62c6\n"
}

@@ -20,2 +20,3 @@ <!-- 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)
- [Object indices & handles](#object-indices--handles)

@@ -454,3 +455,3 @@ - [Status](#status)

- [`/zig/wasmapi.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/wasmapi.zig#L64):
- [`/zig/lib.zig`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/zig/lib.zig#L64):
comments about WASM-side allocator handling in Zig

@@ -546,5 +547,4 @@ - [`/include/wasmapi.h`](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api/include/wasmapi.h#L18):

In Zig (or any other language of your choice) we can then utilize this custom
API like so (Please also see
[tests](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api/test)
& other examples in this readme):
API like so (Please also see [example projects](https://github.com/thi-ng/umbrella/tree/develop/examples/zig-canvas/)
& other example snippets in this readme):

@@ -585,2 +585,15 @@ Bindings file / lib:

### 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`...
### Object indices & handles

@@ -637,3 +650,5 @@

[@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-dom/)
module this is used to manage Zig event listeners.
&
[@thi.ng/wasm-api-timer](https://github.com/thi-ng/umbrella/blob/develop/packages/wasm-api-timer/)
modules this is used to manage Zig event listeners.

@@ -648,3 +663,4 @@ ## Status

- [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-dom) - Browser DOM bridge API for hybrid TypeScript & Zig applications
- [@thi.ng/wasm-api-dom](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-dom) - Browser DOM bridge API for hybrid TypeScript & WASM (Zig) applications
- [@thi.ng/wasm-api-timer](https://github.com/thi-ng/umbrella/tree/develop/packages/wasm-api-timer) - Delayed & scheduled function execution (via setTimeout() etc.) for hybrid WASM apps

@@ -676,4 +692,4 @@ ## Installation

**IMPORTANT:** The package includes code generators for various languages which
are **not** required for just using the API bridge. Hence, the usual package
**IMPORTANT:** The package includes multiple language code generators which are
**not** required for normal use of the API bridge. Hence, the actual package
size in production will be MUCH smaller than what's stated here!

@@ -767,3 +783,3 @@

zig build-lib \
--pkg-begin wasmapi node_modules/@thi.ng/wasm-api/zig/wasmapi.zig --pkg-end \
--pkg-begin wasmapi node_modules/@thi.ng/wasm-api/zig/lib.zig --pkg-end \
-target wasm32-freestanding \

@@ -770,0 +786,0 @@ -O ReleaseSmall -dynamic --strip \

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc