-
Notifications
You must be signed in to change notification settings - Fork 0
Wasm Bindings #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexjg just confirming that these are the only bits that I need for JS packaging across ESM/CJS/etc?
export const wasmBase64: string; | ||
} | ||
`; | ||
writeFileSync(typesFile, typesContents); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file
"exports": { | ||
".": { | ||
"node": { | ||
"import": "./pkg-node/subduction_wasm.js", | ||
"require": "./pkg-node/subduction_wasm.js", | ||
"types": "./pkg-node/subduction_wasm.d.ts" | ||
}, | ||
"import": "./pkg/subduction_wasm.js", | ||
"require": "./pkg/subduction_wasm.js", | ||
"types": "./pkg/subduction_wasm.d.ts" | ||
}, | ||
"./slim": { | ||
"types": "./pkg-slim/index.d.ts", | ||
"import": "./pkg-slim/index.js" | ||
}, | ||
"./subduction_wasm.wasm": "./pkg-slim/subduction_wasm_bg.wasm", | ||
"./subduction_wasm.base64.js": { | ||
"import": "./pkg-slim/subduction_wasm_bg.wasm.base64.js", | ||
"types": "./pkg-slim/subduction_wasm_bg.wasm.base64.d.ts" | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines
.map((c) => c.charCodeAt(0)), | ||
); | ||
subduction.initSync({ module: wasm }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file
Very WIP!