Age | Commit message (Collapse) | Author |
|
`deno_core` is moving out! You'll find it at
https://github.com/denoland/deno_core/ once this PR lands.
|
|
|
|
Fixes #19568
Values are not coerced to the desired type during deserialisation. This
makes serde_v8 stricter.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
`ZeroCopyBuf` was convenient to use, but sometimes it did hide details
that some copies were necessary in certain cases. Also it made it way to easy
for the caller to pass around and convert into different values. This commit
splits `ZeroCopyBuf` into `JsBuffer` (an array buffer coming from V8) and
`ToJsBuffer` (a Rust buffer that will be converted into a V8 array buffer).
As a result some magical conversions were removed (they were never used)
limiting the API surface and preparing for changes in #19534.
|
|
|
|
The type that was received is now printed as part of a message.
|
|
Ref #17318
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
This commit enables serializing `v8::BigInt` to `num_bigint::BigInt`
in Rust.
Pre-requisite for sub upcoming feature work.
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
Closes https://github.com/denoland/deno/issues/2699
Closes https://github.com/denoland/deno/issues/2347
Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not
need to switch the cargo toolchain to nightly. Do we care about
formatting stability of our codebase across Rust versions? (I don't)
|
|
Yearly tradition of creating extra noise in git.
|
|
allocation (#16137)
Existing implementation builds an intermediate vector of object keys
when deserializing using `MapObjectAccess`.
This logic is already handled by `SeqAccess` which can be used directly
by `MapObjectAccess`.
|
|
Signed-off-by: Darshan Sen <raisinten@gmail.com>
|
|
`StructAccess` implements` serde::de::SeqAccess` instead of
`serde::de::MapAccess` thus interpreting structs as sequences.
|
|
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.
In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.
IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #14128
|
|
|
|
Formalize magic types and how they're "transerialized", also makes U16String deserializable
|
|
|
|
Previously we would only deserialize `ArrayBufferView`s as zero-copy bufs
This avoids rewrapping `ArrayBuffers` in `ArrayBufferView`s when implementing APIs that take [BufferSource](https://webidl.spec.whatwg.org/#BufferSource) args passed through the op-layer
|
|
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
|
Reduces fragmentation, avoids version drift and facilitates coordinating serde_v8 and op-layer changes
|
|
Now available at https://github.com/denoland/serde_v8
|
|
Bidirectional zero-copy serialization of buffers between v8 & rust
that can be nested in structs/tuples/etc.
|
|
- Improves op performance.
- Handle op-metadata (errors, promise IDs) explicitly in the op-layer vs
per op-encoding (aka: out-of-payload).
- Remove shared queue & custom "asyncHandlers", all async values are
returned in batches via js_recv_cb.
- The op-layer should be thought of as simple function calls with little
indirection or translation besides the conceptually straightforward
serde_v8 bijections.
- Preserve concepts of json/bin/min as semantic groups of their
inputs/outputs instead of their op-encoding strategy, preserving these
groups will also facilitate partial transitions over to v8 Fast API for the
"min" and "bin" groups
|
|
|
|
|
|
|