Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

tsembind

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

tsembind

EMBind Typescript Declarations Generator

    1.0.2latest

Version published
Maintainers
1
Yearly downloads
3,843

Weekly downloads

Readme

Source

Typescript for Emscripten (TSEMBIND)

Generate .d.ts files using your existing Emscripten projects. Re-compiling is not necessary!

image

Installation:

npm i -g tsembind

Usage:

tsembind my-embind-lib.js

How it works

Embind registers functions,classes, etc. at runtime, by calling JS functions like __embind_register_function() from WASM. These functions can be replaced by replacing WebAssembly.instantiate() with a wrapper. Similarly, __embind_register_function() can be wrapped to compile the type information.

Limitations

Embind only knows the order and type of parameters at runtime. As such, declarations will refer to parameters as arg0, arg1, etc

Compatibility

Known to work with the following EMSDK config.

releases-upstream-c2ac7520fad29a7937ed60ab6a95b08eb374c7ba-64bit node-14.15.5-64bit

Development

Install EMSDK, make sure everything is on the path, and then run npm build

To debug, run npm link followed by tsembind lib/examplelib.js

To run the automatic tests, run npm test

FAQs

What is tsembind?

EMBind Typescript Declarations Generator

Is tsembind popular?

The npm package tsembind receives a total of 536 weekly downloads. As such, tsembind popularity was classified as not popular.

Is tsembind well maintained?

We found that tsembind demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 22 Aug 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc