Emacs Module in Rust
This provides a high-level binding to emacs-module
.
Code for a minimal module looks like this:
extern crate libc;
extern crate emacs;
use ;
emacs_plugin_is_GPL_compatible!;
emacs_module_init!;
(require 'greeting)
(greeting-say-hello "Emacs")
Live Reloading
Emacs does not support unloading modules. Live reloading thus requires a custom module loader. rs-module is one such loader (which itself is a module that must be loaded by Emacs's normal loading mechanism). See load.sh.
Sample Modules
test-module uses most of the provided features.
Development
- Building:
cargo build --all
- Testing:
bin/test.sh
- Continuous testing (requires
cargo-watch
):cargo watch -x 'build --all' -s bin/test.sh