V8 FunctionCallbackInfo has... almost nothing?

Implementing a JavaScript function natively in Rust requires access to arguments and this receiver; but I don't see any of these here:

Looking right here: rusty_v8/examples/process.rs at 65fb5c168395b022755007096a0000d77f9d3704 · denoland/rusty_v8 · GitHub It looks like this C signature is used another way...

FunctionCallbackInfo (as opposed to Arguments) is part of the "raw" C-ABI, which you generally never need to deal with. The necessary dance to put the right scope in place and extract the accessors from it are done for you in a wrapping function the v8 crate does for you in most cases, but you can also do it yourself IIRC (eg if you're doing something like a proxy?)

You can see the uses of it as a parameter in docs search, which shows you how to get the accessors for the arguments and the return value:

1 Like