-
Notifications
You must be signed in to change notification settings - Fork 320
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
Add ValueSerializer, ValueDeserializer bindings for structured clone in deno #442
Conversation
First of all - structure clone support is high on our wish list, so your effort is very much appreciated. Your rust code so far looks great. I'll comment in-line if I have any suggestions. One thing though - it looks like we will also need bindings for |
Thanks for the feedback, I fixed the issues and continued programming the missing parts. |
That is indeed what I would have suggested; I'm impressed you were able to figure it out since that solution is not so straightforward or elegant. |
Thanks for the support; I think we are making some great progress! I was wondering with regards to cleaning up the
|
It should be converted to either |
🤔 It seems like the I would guess the following code would not work as this creates a new let scope = &mut v8::HandleScope::new(isolate); Instead, is there a way to retrieve the instantiated |
It is possible, although there are some safety constraints to it. |
Ok thx, I cleaned up the interface. Currently, the |
I added an extra test that serializes a javascript object and deserializes it in another "Isolate". It looks like we're getting close to finishing this WIP 🎉! |
I think that is the most important TODO item at this point. As you might have noticed I also have some concerns w.r.t the current "strategy" for allocating and resizing serializer buffers - I have some ideas but I need to sit down and work on the code myself for a bit (otherwise I'll end up proposing "solutions" that turn out not to work after all). Other than that this looks pretty good and almost done. |
Other TODOs:
|
UPDATE:
|
Apologies for the delay, I’ll land this soon. |
@inteon I rebased your branch to fix the merge conflicts and I took the liberty of addressing some style issues. It passes for me locally and I'll merge it when the CI is green. Nice work, thanks! |
@bnoordhuis ok thx |
Hey!
I started working on this issue, meanwhile I'm trying to familiarize myself with the project.
I'm not an experienced Rust developer; so please review my code!
The code I uploaded compiles, but maybe there are still some non-best-practices in the code.
Could you give some feedback before I continue working on this issue?
The current progress:
Not-Implemented
exceptions forwrite_host_object
,get_shared_array_buffer_id
, ...throw_data_clone_error
custom callback