Open Redfire75369 opened 3 years ago
mozjs_sys is a separate crate at https://github.com/servo/mozjs/blob/ef986b1a2c23081fe4d37aeaab5323d3dec033f3/src/jsgc.rs#L20, so you can depend on that without changing this crate.
It is possible to depend on both simultaneously, but due to mozjs
depending mozjs_sys
as well, you have to specify the exact commit of mozjs_sys
that your current version of mozjs
uses. This means it is more difficult and inconvenient to update mozjs
.
RootedGuard<'_, T>
requires that T implementmozjs_sys::jsgc::RootKind
.This issues involves exporting
mozjs_sys::jsgc::*
inmozjs
.Reason
Currently, I am unable to create a generic function that does this as this struct is not exported by
mozjs
. This will be useful for creating utility functions to set a value without requiring you to manually convert it usingToJSValConvertible
.Implementation Code