rusty_v8
rusty_v8 copied to clipboard
Expose `ModifyCodeGenerationFromStrings` callback
Implements https://github.com/denoland/rusty_v8/issues/1716. Most of the code was taken from https://github.com/denoland/rusty_v8/pull/435 and adapted to work with the current V8 version (credits for the original PR go to @NeoLegends).
The approach implemented in this PR is somewhat limited (but does match the feature set of the previous PR):
- There's no
HandleScopeavailable in the callback, so it doesn't seem to be possible to read or modify the source code - The attribute
#[allow(improper_ctypes_definitions)]must be added to the callback function for it to not be (as far as I know, incorrectly) flagged with a warning