Skip to content
Oeiuwq Faith Blog OpenSource Porfolio

ubolonton/emacs-module-rs

Rust binding and tools for Emacs's dynamic modules

ubolonton/emacs-module-rs.json
{
"createdAt": "2017-12-22T01:26:16Z",
"defaultBranch": "master",
"description": "Rust binding and tools for Emacs's dynamic modules",
"fullName": "ubolonton/emacs-module-rs",
"homepage": "",
"language": "Rust",
"name": "emacs-module-rs",
"pushedAt": "2025-05-10T05:22:40Z",
"stargazersCount": 358,
"topics": [
"binding",
"emacs",
"emacs-modules",
"ffi",
"rust"
],
"updatedAt": "2025-11-23T21:07:50Z",
"url": "https://github.com/ubolonton/emacs-module-rs"
}

crates.io doc.rs Azure Pipelines GitHub Actions

User Guide | Change Log | 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::plugin_is_GPL_compatible!();
#[emacs::module(name = "greeting")]
fn init(_: &Env) -> Result<()> { Ok(()) }
#[defun]
fn say_hello(env: &Env, name: String) -> Result<Value<'_>> {
env.message(&format!("Hello, {}!", name))
}
(require 'greeting)
(greeting-say-hello "Emacs")
  • Building:
    Terminal window
    bin/build
  • Testing:
    Terminal window
    bin/test
  • Continuous testing (requires cargo-watch):
    Terminal window
    bin/test watch

On Windows, use PowerShell to run the corresponding .ps1 scripts.