@wapython/core
Advanced tools
+1
-1
| { | ||
| "name": "@wapython/core", | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "description": "wapython -- Web Assembly Python Core", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+24
-3
@@ -1,5 +0,26 @@ | ||
| # Library | ||
| # wapython | ||
| This will be a library to make our WebAssembly modules useful from Javascript. | ||
| See [the main repo](https://github.com/sagemathinc/wapython/blob/main/README.md) for more information about what this is. | ||
| It uses zig and typescript, and is an alternative to using emscripten. There is also https://github.com/schellingb/wajic which might be another good approach to this problem. | ||
| ## Using wapython from node.js | ||
| The following should work with nodejs version 16.x (for node 14 use the `--experimental-wasm-bigint` option) on Linux, MacOS, and **native** Microsoft Windows. | ||
| ```sh | ||
| wstein@max % mkdir wapython && cd wapython && npm init -y && npm install @wapython/core | ||
| wstein@max % node # for older node, use "node --experimental-wasm-bigint" | ||
| Welcome to Node.js v16.13.0. | ||
| Type ".help" for more information. | ||
| > {python} = require('@wapython/core') | ||
| > python.exec('2+2') | ||
| 4 | ||
| > python.exec('import sys; sys.version') | ||
| '3.11.0b3 (main, Jul 8 2022, 23:21:07) [Clang 13.0.1 (git@github.com:ziglang/zig-bootstrap.git 81f0e6c5b902ead84753490d' | ||
| > python.exec('import sys; sys.platform') | ||
| 'wasi' | ||
| ``` | ||
| ## Using wapython in a webpage | ||
| This is not supported yet. |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
9786029
0.01%27
440%