-
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
Initial support for external v8 strings #641
Conversation
Partially fixes denoland#636, by adding support for static rust strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you add a small test?
I'd prefer to keep the function name the same as in V8, as you have done.
As well as is_external_onebyte() and is_external_twobyte()
@ry Added some simple tests and exposed some relevant v8 methods:
See notes on The C++ binding fallsback to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks @AaronO
This PR partially fixes #636, by adding support for external static rust strings.
Rust doesn't have utf16 (or two-byte string) literals, so we could shorten the name in this static case, i.e:
We could support non-static external strings too, but I'm not sure we want to encourage that.