DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
431 stars 58 forks source link

Proc macro function with static can't be used with rename atom #315

Open richarddd opened 1 month ago

richarddd commented 1 month ago

For example:

Working:

#[qjs(static, rename = "has_instance")]
pub fn has_instance<'js>(value: Value<'js>) -> bool {
    false
}

Causes exception

#[qjs(static, rename = PredefinedAtom::SymbolHasInstance)]
pub fn has_instance<'js>(value: Value<'js>) -> bool {
    false
}