Files
turso/bindings/javascript/sync/src
Pekka Enberg fccc31918d sync/JS-bindings: send sync request bodies as Uint8Array
The browser build runs the same napi module through emnapi, where
`globalThis.Buffer` does not exist, so creating a `Buffer` from Rust
fails with NotSupportBufferError and every sync test in chromium
errors out.

A `Uint8Array` carries the bytes just as cheaply on Node (napi-rs takes
ownership of the `Vec<u8>` and hands V8 an external ArrayBuffer) and
emnapi supports it in the browser, where it copies the bytes out of wasm
memory. The JS side already accepts `Buffer | Uint8Array` everywhere
these values are consumed.

Tests: sync bindings on node and browser
2026-09-03 20:41:11 +03:00
..
2025-12-11 14:43:28 +04:00