@rolldown/binding-wasm32-wasi
Advanced tools
Comparing version 0.10.2-snapshot-a031226-20240418002532 to 0.10.2-snapshot-c749dce-20240425002857
{ | ||
"name": "@rolldown/binding-wasm32-wasi", | ||
"version": "0.10.2-snapshot-a031226-20240418002532", | ||
"version": "0.10.2-snapshot-c749dce-20240425002857", | ||
"cpu": [ | ||
@@ -40,4 +40,4 @@ "wasm32" | ||
"dependencies": { | ||
"@napi-rs/wasm-runtime": "^0.1.2" | ||
"@napi-rs/wasm-runtime": "^0.2.0" | ||
} | ||
} |
@@ -5,12 +5,8 @@ import { | ||
WASI as __WASI, | ||
createOnMessage as __wasmCreateOnMessageForFsProxy, | ||
} from '@napi-rs/wasm-runtime' | ||
import { Volume as __Volume, createFsFromVolume as __createFsFromVolume } from '@napi-rs/wasm-runtime/fs' | ||
import { memfs } from '@napi-rs/wasm-runtime/fs' | ||
import __wasmUrl from './rolldown-binding.wasm32-wasi.wasm?url' | ||
const __fs = __createFsFromVolume( | ||
__Volume.fromJSON({ | ||
'/': null, | ||
}), | ||
) | ||
export const { fs: __fs, vol: __volume } = memfs() | ||
@@ -20,2 +16,5 @@ const __wasi = new __WASI({ | ||
fs: __fs, | ||
preopens: { | ||
'/': '/', | ||
} | ||
}) | ||
@@ -42,5 +41,9 @@ | ||
onCreateWorker() { | ||
return new Worker(new URL('@rolldown/binding-wasm32-wasi/wasi-worker-browser.mjs', import.meta.url), { | ||
const worker = new Worker(new URL('@rolldown/binding-wasm32-wasi/wasi-worker-browser.mjs', import.meta.url), { | ||
type: 'module', | ||
}) | ||
worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs)) | ||
return worker | ||
}, | ||
@@ -80,12 +83,15 @@ overwriteImports(importObject) { | ||
__napiInstance.exports['__napi_register__register_plugins_23']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputAsset_struct_24']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputAsset_impl_27']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputChunk_struct_28']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputChunk_impl_39']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputs_struct_40']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputs_impl_43']?.() | ||
__napiInstance.exports['__napi_register__RenderedChunk_struct_44']?.() | ||
__napiInstance.exports['__napi_register__BindingRenderedModule_struct_45']?.() | ||
__napiInstance.exports['__napi_register__AliasItem_struct_46']?.() | ||
__napiInstance.exports['__napi_register__BindingModuleInfo_struct_24']?.() | ||
__napiInstance.exports['__napi_register__BindingModuleInfo_impl_26']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputAsset_struct_27']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputAsset_impl_30']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputChunk_struct_31']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputChunk_impl_42']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputs_struct_43']?.() | ||
__napiInstance.exports['__napi_register__BindingOutputs_impl_46']?.() | ||
__napiInstance.exports['__napi_register__RenderedChunk_struct_47']?.() | ||
__napiInstance.exports['__napi_register__BindingRenderedModule_struct_48']?.() | ||
__napiInstance.exports['__napi_register__AliasItem_struct_49']?.() | ||
} | ||
export const BindingModuleInfo = __napiModule.exports.BindingModuleInfo | ||
export const BindingOutputAsset = __napiModule.exports.BindingOutputAsset | ||
@@ -92,0 +98,0 @@ export const BindingOutputChunk = __napiModule.exports.BindingOutputChunk |
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
4010005
291
+ Added@napi-rs/wasm-runtime@0.2.6(transitive)
+ Added@tybys/wasm-util@0.9.0(transitive)
- Removed@napi-rs/wasm-runtime@0.1.2(transitive)
- Removed@tybys/wasm-util@0.8.3(transitive)
Updated@napi-rs/wasm-runtime@^0.2.0