Skip to content
Rust binding and tools for emacs-module (Emacs's dynamic module support)
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Move test code in test-module from src/ to tests/ Apr 16, 2019
emacs-macros 0.8.0 Apr 20, 2019
emacs-module Add more metadata to Cargo.toml files Apr 16, 2019
guide 0.8.0 Apr 20, 2019
rs-module 0.8.0 Apr 20, 2019
src Use absolute path for links between `emacs` and `emacs-macros` Apr 20, 2019
.gitignore Don't track Cargo.lock Apr 15, 2017
.rustfmt.toml Make rustfmt config more sensible Apr 17, 2019
.travis.yml Run `cargo test` on CI Apr 16, 2019 Linkify releases in CHANGELOG Apr 20, 2019
Cargo.toml 0.8.0 Apr 20, 2019

Emacs Module in Rust Build Status

User Guide | Examples

This provides a high-level binding to emacs-module, Emacs's support for dynamic modules.

Code for a minimal module looks like this:

use emacs::{defun, Env, Result, Value};


#[emacs::module(name = "greeting")]
fn init(_: &Env) -> Result<()> { Ok(()) }

fn say_hello(env: &Env, name: String) -> Result<Value<'_>> {
    env.message(&format!("Hello, {}!", name))
(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

Note: This doesn't work on macOS 10.13+ (High Sierra and up). See Rust's issue #28794.

Sample Modules


  • Building:
    cargo build --all
  • Testing:
  • Continuous testing (requires cargo-watch):
    cargo watch -x 'build --all' -s bin/
You can’t perform that action at this time.