@bytecodealliance/jco
Advanced tools
Comparing version 0.6.1 to 0.7.0
29
api.d.ts
@@ -34,7 +34,25 @@ /** | ||
optArgs?: string[], | ||
/// rewrite WASI imports to the @bytecodealliance/preview2-shim | ||
/// defaults to false | ||
/// rewrites WASI imports to the @bytecodealliance/preview2-shim | ||
/// defaults to true | ||
wasiShim?: boolean | ||
} | ||
export interface EmbedOpts { | ||
/// Component binary to embed | ||
binary?: Uint8Array, | ||
/// Pass an inline WIT source | ||
witSource?: string, | ||
/// Pass the file system path to WIT file | ||
/// Either a path or a source must be passed not both | ||
witPath?: string, | ||
/// String encoding for the component functions | ||
stringEncoding?: 'utf8' | 'utf16', | ||
/// Generate a dummy component | ||
dummy: option<bool>, | ||
/// World name to embed | ||
world?: string, | ||
/// Metadata to embed | ||
metadata?: Metadata | ||
} | ||
/** | ||
@@ -69,8 +87,3 @@ * Transpile a Component into a JS-executable package | ||
*/ | ||
export function componentEmbed(binary: Uint8Array | ArrayBuffer | null, wit: string, opts: { | ||
stringEncoding?: 'utf8' | 'utf16' | 'compact-utf16', | ||
dummy?: boolean, | ||
world?: string, | ||
metadata?: Metadata | ||
}): Uint8Array; | ||
export function componentEmbed(opts: EmbedOpts): Uint8Array; | ||
@@ -77,0 +90,0 @@ /** |
{ | ||
"name": "@bytecodealliance/jco", | ||
"description": "JavaScript tooling for working with WebAssembly Components", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"exports": "./api.mjs", | ||
@@ -11,2 +11,5 @@ "types": "api.d.ts", | ||
}, | ||
"dependencies": { | ||
"@bytecodealliance/preview2-shim": "0.0.8" | ||
}, | ||
"repository": { | ||
@@ -13,0 +16,0 @@ "type": "git", |
@@ -73,3 +73,3 @@ <div align="center"> | ||
``` | ||
jco componentize app.js --wit world.wit -o component.wasm | ||
jco componentize app.js --wit wit -n world-name -o component.wasm | ||
``` | ||
@@ -76,0 +76,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29051631
13
83936
1
+ Added@bytecodealliance/preview2-shim@0.0.8(transitive)