Comments (3)
when I delete encode, the error is error: Uncaught (in promise) TypeError: Invalid FFI pointer type, expected null, integer or BigInt
+ deno run --unstable -A test.js
Uint8Array(223418) [
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68,
82, 0, 0, 3, 32, 0, 0, 3, 32, 8, 6, 0, 0, 0, 219,
112, 6, 104, 0, 3, 104, 129, 73, 68, 65, 84, 120, 156, 236, 253,
125, 172, 37, 231, 125, 223, 9, 214, 83, 85, 247, 165, 95, 216, 162,
152, 38, 77, 133, 140, 68, 135, 132, 69, 209, 145, 32, 197, 14, 163,
216, 227, 73, 35, 241, 174, 55, 26, 5, 144, 98, 216, 142, 227, 137,
200, 205, 219, 172, 181, 99, 197, 246, 96, 118,
... 223318 more items
] 223418
error: Uncaught (in promise) TypeError: Invalid FFI pointer type, expected null, integer or BigInt
let rawResult = _lib.symbols.toWebp(a0, a0.byteLength, a1)
from deno_bindgen.
It's not TextEncoder, encode
function returns back the input its a TypedArray
from deno_bindgen.
@usrtax
deno_bindgen cannot return binary data which included by structs because struct is always convert to the JavaScript's Object through JSON.parse
I think If you want to return binary, you have two choice.
- Return TypeArray only.
- Use base64 for encode binary to String, and decode string to bytes in Deno.
from deno_bindgen.
Related Issues (20)
- add support for Option<xx> (for example Option<Vec<u8>>)
- memery leak for deno_bindgen HOT 3
- async codegen type decls missing & no promise resolving of number/void types
- Encode as cstring instead of ptr + len HOT 2
- Argument of type 'bigint' is not assignable to parameter of type 'PointerObject'.deno-ts(2345) HOT 2
- Problem with struct params HOT 3
- cargo not building on linux
- issue with compilation and intellisence
- Use environment variable OUT_DIR for the location of bindings.json
- feat: Have release builds always generate a new bindings.ts file
- Bug: Program crash after deno_bindgen rebuild HOT 1
- Bug: Runtime type error when return String in non_blocking mode HOT 1
- Segmentation fault with Deno Test HOT 4
- Generated bindings.ts no longer works with latest deno
- Unable to run deno_bindgen HOT 1
- Publish new release/tag for Deno 1.24.1 HOT 4
- Doesn't work with Deno v1.25.0 HOT 3
- deno_bindgen does not work properly on Windows. HOT 1
- deno_bindgen = "0.6.0": message: Type definition not found for `f32` identifier HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno_bindgen.