Socket
Socket
Sign inDemoInstall

@jitl/quickjs-wasmfile-debug-asyncify

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jitl/quickjs-wasmfile-debug-asyncify - npm Package Compare versions

Comparing version 0.25.0-rc.6 to 0.25.0-rc.7

2

dist/emscripten-module.browser.d.ts
// Generated from ../../templates/emscripten-module.ASYNCIFY.d.ts
import { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
import type { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
/**

@@ -4,0 +4,0 @@ * Emscripten module built from [`quickjs/quickjs.h`](../quickjs/quickjs.h) and

// Generated from ../../templates/emscripten-module.ASYNCIFY.d.ts
import { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
import type { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
/**

@@ -4,0 +4,0 @@ * Emscripten module built from [`quickjs/quickjs.h`](../quickjs/quickjs.h) and

@@ -1,27 +0,6 @@

import * as _jitl_quickjs_ffi_types from '@jitl/quickjs-ffi-types';
import { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from '@jitl/quickjs-ffi-types';
import { QuickJSAsyncFFI } from './ffi.js';
import { QuickJSAsyncVariant } from '@jitl/quickjs-ffi-types';
// Generated from ../../templates/emscripten-module.ASYNCIFY.d.ts
/**
* Emscripten module built from [`quickjs/quickjs.h`](../quickjs/quickjs.h) and
* our FFI support functions [c/interface.c](../c/interface.c), compiled with -s
* ASYNCIFY=1.
*
* Because this version is built with ASYNCIFY, the C code can call asynchronous
* Javascript functions as though they were synchronous.
*
* Note that emscripten modules returned by a `MODULARIZE=1` emscripten build
* (like this one) load asynchronously.
*/
declare const ModuleLoader: EmscriptenModuleLoader<QuickJSAsyncEmscriptenModule>
declare namespace ___dist_emscripten_module_browser_js {
export { ModuleLoader as default };
}
/**
* This export is a variant of the quickjs WASM library:
* ### [@jitl/quickjs-wasmfile-debug-asyncify](https://github.com/justjake/quickjs-emscripten/blob/main/doc/packages/@jitl/quickjs-wasmfile-debug-asyncify/README.md)
* ### [@jitl/quickjs-wasmfile-debug-asyncify](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-debug-asyncify/README.md)
*

@@ -33,3 +12,3 @@ * Variant with separate .WASM file. Supports browser, NodeJS ESM, and NodeJS CJS.

* | releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
* | syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. Larger and slower. Allows synchronous calls from the WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! |
* | syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
* | emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |

@@ -39,14 +18,4 @@ * | exports | require import browser | Has these package.json export conditions |

*/
declare const variant: {
readonly type: "async";
readonly importFFI: () => Promise<(new (module: _jitl_quickjs_ffi_types.QuickJSAsyncEmscriptenModule) => _jitl_quickjs_ffi_types.QuickJSAsyncFFI) | typeof QuickJSAsyncFFI>;
readonly importModuleLoader: () => Promise<typeof ___dist_emscripten_module_browser_js | _jitl_quickjs_ffi_types.EmscriptenModuleLoader<_jitl_quickjs_ffi_types.QuickJSAsyncEmscriptenModule> | {
default: _jitl_quickjs_ffi_types.EmscriptenModuleLoader<_jitl_quickjs_ffi_types.QuickJSAsyncEmscriptenModule>;
} | {
default: {
default: _jitl_quickjs_ffi_types.EmscriptenModuleLoader<_jitl_quickjs_ffi_types.QuickJSAsyncEmscriptenModule>;
};
}>;
};
declare const variant: QuickJSAsyncVariant;
export { variant as default };
{
"name": "@jitl/quickjs-wasmfile-debug-asyncify",
"version": "0.25.0-rc.6",
"version": "0.25.0-rc.7",
"description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser, NodeJS ESM, and NodeJS CJS.",

@@ -24,4 +24,2 @@ "sideEffects": false,

"dist/**/*",
"!dist/ffi.ts",
"!dist/index.ts",
"!dist/*.tsbuildinfo"

@@ -54,4 +52,4 @@ ],

"dependencies": {
"@jitl/quickjs-ffi-types": "0.25.0-rc.6"
"@jitl/quickjs-ffi-types": "0.25.0-rc.7"
}
}

@@ -28,9 +28,9 @@ # @jitl/quickjs-wasmfile-debug-asyncify

- undefined
- undefined
- Exports a browser-compatible ESModule.
- Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule.
- Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module.
- Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments.
## Extra async magic? Yes
Build run through the ASYNCIFY WebAssembly transform. Larger and slower. Allows synchronous calls from the WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to!
Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs.

@@ -37,0 +37,0 @@ ## Single-file, or separate .wasm file? wasm

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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