Skip to content
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

V8: GC for Rust Objects #748

Open
Sharktheone opened this issue Dec 30, 2024 · 0 comments
Open

V8: GC for Rust Objects #748

Sharktheone opened this issue Dec 30, 2024 · 0 comments
Labels
javascript api Any issues related to our API interaction with the javascript engine javascript Any issues related to JavaScript

Comments

@Sharktheone
Copy link
Member

In V8, we can use the GC to directly tie the Rust Struct to the JS Object. We Probably should use that because the current implementation uses a Rc<RefCell> mess. The Rc gets cloned for every method that might be executed and needs a Reference to the struct itself.

Additionally, the old approach with a Rc does not work when we correctly make use of the prototypes in JS.

Somehow still need to be able to use the Objects Allocated on the V8 heap without knowing that they live on and are managed by the V8 heap.

@Sharktheone Sharktheone added javascript Any issues related to JavaScript javascript api Any issues related to our API interaction with the javascript engine labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript api Any issues related to our API interaction with the javascript engine javascript Any issues related to JavaScript
Projects
Status: No status
Development

No branches or pull requests

1 participant