Sign In

@napi-rs/wasm-runtime

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@napi-rs/wasm-runtime - npm Package Compare versions

Comparing version
1.2.0
to
1.2.1
dist/emnapi-plugins.cjs

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

+5
-4
{
"name": "@napi-rs/wasm-runtime",
"version": "1.2.0",
"version": "1.2.1",
"type": "module",

@@ -32,2 +32,3 @@ "description": "Runtime and polyfill for wasm targets",

"devDependencies": {
"@emnapi/core": "2.0.0-alpha.3",
"@rollup/plugin-alias": "^6.0.0",

@@ -54,8 +55,8 @@ "@rollup/plugin-commonjs": "^29.0.3",

"peerDependencies": {
"@emnapi/core": "^2.0.0-alpha.3",
"@emnapi/runtime": "^2.0.0-alpha.3"
"@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3",
"@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3"
},
"scripts": {
"build": "rollup -c rollup.config.js",
"test": "node --test"
"test": "yarn run build && node --test"
},

@@ -62,0 +63,0 @@ "funding": {

@@ -16,7 +16,9 @@ const {

// this mirrors the upstream @emnapi/core v2 plugin split (v1 bundled these
// implementations in the core runtime).
// implementations in the core runtime). The plugins are bundled into this
// package so loading the runtime with @emnapi/core v1 does not resolve the
// v2-only `@emnapi/core/plugins` package export.
const {
asyncWork: emnapiAsyncWorkPlugin,
tsfn: emnapiTSFNPlugin,
} = require('@emnapi/core/plugins')
emnapiAsyncWorkPlugin,
emnapiTSFNPlugin,
} = require('./dist/emnapi-plugins.cjs')
const { createContext, getDefaultContext } = require('@emnapi/runtime')

@@ -23,0 +25,0 @@ const { WASI } = require('@tybys/wasm-util')

@@ -1,6 +0,13 @@

export {
instantiateNapiModuleSync,
instantiateNapiModule,
MessageHandler,
} from '@emnapi/core'
import * as emnapiCore from '@emnapi/core'
import * as emnapiRuntime from '@emnapi/runtime'
import {
emnapiAsyncWorkPlugin,
emnapiTSFNPlugin,
} from './dist/emnapi-plugins.js'
const { instantiateNapiModuleSync, instantiateNapiModule, MessageHandler } =
emnapiCore
const { createContext, getDefaultContext } = emnapiRuntime
// Single-threaded (non-shared-memory) WASI builds link an emnapi archive

@@ -16,9 +23,15 @@ // without the C async-work and threadsafe-function implementations (they are

// this mirrors the upstream @emnapi/core v2 plugin split (v1 bundled these
// implementations in the core runtime).
// implementations in the core runtime). The plugins are bundled into this
// package so loading the runtime with @emnapi/core v1 does not resolve the
// v2-only `@emnapi/core/plugins` package export.
export {
asyncWork as emnapiAsyncWorkPlugin,
tsfn as emnapiTSFNPlugin,
} from '@emnapi/core/plugins'
export { createContext, getDefaultContext } from '@emnapi/runtime'
MessageHandler,
createContext,
emnapiAsyncWorkPlugin,
emnapiTSFNPlugin,
getDefaultContext,
instantiateNapiModule,
instantiateNapiModuleSync,
}
export * from '@tybys/wasm-util'
export { createOnMessage, createFsProxy } from './fs-proxy.js'