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

The long road to rusty_v8 #3556

Merged
merged 85 commits into from
Jan 5, 2020
Merged

The long road to rusty_v8 #3556

merged 85 commits into from
Jan 5, 2020

Conversation

ry
Copy link
Member

@ry ry commented Dec 27, 2019

Fixes #3530, replaces libdeno with rusty_v8
Fixes #3367, cannot publish cargo crate
Towards #1120, chrome devtools debug because rusty-v8 binds the inspector API

https://crates.io/crates/rusty_v8

The first goal is to pass

cargo test -p deno -vv

@ry ry mentioned this pull request Dec 29, 2019
61 tasks
Comment on lines +713 to +718
let error = msg.get_value();
let mut error_global = v8::Global::<v8::Value>::new();
error_global.set(scope, error);
deno_isolate
.pending_promise_map_
.insert(promise_id, error_global);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ry @piscisaureus msg.get_value() is an example of empty Local<> handle - originally (ie. in libdeno) promise was assigned to variable at the top of the function - I tried doing the same here and it failed. To be more precise, if event is PromiseHandlerAddedAfterReject then mgs.get_promise() returns Local<Promise> which is empty, in our case it crashes because of the unwrap() in get_promise.

Anyway, this works now, just wanted to let you know I encountered Local<> that actually has an empty handle

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, this works now, just wanted to let you know I encountered Local<> that actually has an empty handle

I'm aware that this happens. If you encounter one of these cases, feel free to change the API by swapping out the Local<T> for an Option<Local<T>>.

@ry ry requested a review from bartlomieju January 5, 2020 14:15
@ry
Copy link
Member Author

ry commented Jan 5, 2020

@bartlomieju @piscisaureus Amazing work! I'm very happy to see this PR merge - we've been working on it in one form or another for about 5 months now. This is the beginning of a new era for Deno, where the build and binding complexity is pushed into a separate crate. There is a lot to clean up, but I think it's better to do that in follow up PRs, as long as this stays green.

@ry ry merged commit 5f1df03 into master Jan 5, 2020
@ry
Copy link
Member Author

ry commented Jan 5, 2020

The executable size almost doubled after this PR. I'm not sure what exactly caused this...

#3599

Screen Shot 2020-01-05 at 9 37 04 AM

@ry ry deleted the rusty_v8 branch January 5, 2020 16:56
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace libdeno with rusty_v8 Rust crates cannot be published to crates.io
3 participants