I think when I first wrote this I misunderstood how const works in Rust. const makes the compiler just do a compile-time substitution of the value into each of its references, so it was making a new temporary Plugin object every time it needed to create a plugin handle pointer to pass into Janus. static is what we actually want.
I think when I first wrote this I misunderstood how
const
works in Rust.const
makes the compiler just do a compile-time substitution of the value into each of its references, so it was making a new temporaryPlugin
object every time it needed to create a plugin handle pointer to pass into Janus.static
is what we actually want.