rusty_v8 icon indicating copy to clipboard operation
rusty_v8 copied to clipboard

Expose `ModifyCodeGenerationFromStrings` callback

Open rebu-dt opened this issue 7 months ago • 1 comments

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 HandleScope available 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

rebu-dt avatar Mar 05 '25 12:03 rebu-dt