We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Host.arrayBufferToBase64
Repro:
export function greet() { const base64String = "SGVsbG8g8J+MjSBXb3JsZCHwn4yN"; console.log('decoding string:', base64String); const decodedBuffer = Host.base64ToArrayBuffer(base64String); const decodedString = new TextDecoder().decode(decodedBuffer); console.log('decoded string:', decodedString); const encodedBuffer = Host.arrayBufferToBase64(decodedBuffer); console.log('encoded string:', encodedBuffer); Host.outputString(`Hello, ${Host.inputString()}`) }
v1.3.3:
mo@mo-dylibso:/mnt/d/x/extism/ts_plugin$ extism-js --version extism-js 1.3.3 mo@mo-dylibso:/mnt/d/x/extism/ts_plugin$ npm run build && npm run test > [email protected] build > tsc --noEmit && node esbuild.js && extism-js dist/index.js -i src/index.d.ts -o dist/plugin.wasm > [email protected] test > extism call dist/plugin.wasm greet --input 'Mo' --wasi --log-level debug 2025/01/12 19:57:17 Calling function : greet 2025/01/12 19:57:17 decoding string: SGVsbG8g8J+MjSBXb3JsZCHwn4yN 2025/01/12 19:57:17 decoded string: Hello 🌍 World!🌍 Error: wasm error: unreachable wasm stack trace: .$1363(i32,i32,i32,i32,i32) .$1496(i32,i32) .$1487(i32,i32,i32) .$1513(i32) .$217(i32,i32) i32 .$1567(i32) i32 .$1584() i32 returned non-zero exit code: 1
v1.2.0:
mo@mo-dylibso:/mnt/d/x/extism/ts_plugin$ extism-js --version extism-js 1.2.0 mo@mo-dylibso:/mnt/d/x/extism/ts_plugin$ npm run build && npm run test > [email protected] build > tsc --noEmit && node esbuild.js && extism-js dist/index.js -i src/index.d.ts -o dist/plugin.wasm > [email protected] test > extism call dist/plugin.wasm greet --input 'Mo' --wasi --log-level debug 2025/01/12 19:59:05 Calling function : greet 2025/01/12 19:59:05 decoding string: SGVsbG8g8J+MjSBXb3JsZCHwn4yN 2025/01/12 19:59:05 decoded string: Hello 🌍 World!🌍 2025/01/12 19:59:05 encoded string: SGVsbG8g8J+MjSBXb3JsZCHwn4yN Hello, Mo
The text was updated successfully, but these errors were encountered:
See https://github.com/dylibso/xtp-typescript-bindgen/actions/runs/12733723565/job/35490419178
Sorry, something went wrong.
arrayBufferToBase64
Successfully merging a pull request may close this issue.
Repro:
v1.3.3:
v1.2.0:
The text was updated successfully, but these errors were encountered: