ubolonton / emacs-module-rs

Rust binding and tools for Emacs's dynamic modules
336 stars 22 forks source link

Support long-lived values that are not bound to &Env (GlobalValue) #8

Open ubolonton opened 5 years ago

ubolonton commented 5 years ago

The biggest problem with this is that free_global_ref() requires an emacs_env, thus cannot be used directly in GlobalValue::drop() (this is likely a mis-design in emacs-module (BEAM's enif_release_resource doesn't need an env, for example)). There are 2 potential ways to solve this:

ubolonton commented 3 years ago

This was added in release 0.13.0, but has not been stabilized/documented yet.