Skip to main content

wasmjs

Simple Python wrapper around QuickJS-NG's qjs-wasi-reactor.wasm.

Quickstart

$ python -m venv my-project
$ source my-project/bin/activate
$ pip install wasmjs
$ python
>>> from wasmjs import wasmjs
>>> js = wasmjs.WasmJS()
>>> js.eval('1 + 2')
3
>>> js.eval('("hello" + "there").toUpperCase()')
'HELLOTHERE'
>>> js.eval('({one: 1, two: 2})')
{'one': 1, 'two': 2}

Structure

qjs-wasi-reactor.wasm is essentially 3 build targets statically linked together:

The API bindings for each component are separated into:

  • WasmFile
  • api.wasilibc
    • malloc that changes the return type of wasi-libc's malloc from an int32 to a uint32, etc.
  • api.memutil
    • Convenience functions to get strings and other complex types into and out of the Wasm virtual machine.
  • api.qjs
    • JS_Eval that keeps track of the global context, etc.
  • api.js
    • Convenience functions to handle all of the multi-step qjs flows.
  • jsvalueutil
    • All of the logic needed to get data into and out of the JS virtual machine (inside the Wasm virtual machine).
  • WasmJS
    • Convenience layer to simplify all of the above.

Metadata

Release files for wasmjs 0.0.18.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wasmjs 0.0.18.0.0
File Size Uploaded Provenance Actions
wasmjs-0.0.18.0.0.tar.gz 13.0 kB Without provenance Details for wasmjs-0.0.18.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wasmjs 0.0.18.0.0
File Interpreter ABI Platform Actions
wasmjs-0.0.18.0.0-py3-none-any.whl Python 3 none any Details for wasmjs-0.0.18.0.0-py3-none-any.whl

Total release size: 23.8 kB

Release files / wasmjs-0.0.18.0.0.tar.gz

Download URL wasmjs-0.0.18.0.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
33808c6140e2cccf19162e62a6edf816610b4026309b0c53faa2c74b910ba064
BLAKE2b-256 checksum
How to use checksums
13a3b42e849ded38354cff14ab379e7bf5257444eb78c3f43c5d6d26ed933632
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / wasmjs-0.0.18.0.0-py3-none-any.whl

Download URL wasmjs-0.0.18.0.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fea41522ecf41bb9c03e8e77116c8d29bb0619cd5d43b767e8dbee195cac350
BLAKE2b-256 checksum
How to use checksums
6d5eb397d3a5f7ca2748f4f67887f30292907c4e4885176d88ccc1a377bd83c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for wasmjs 0.0.18.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page