ubolonton/emacs-module-rs
Rust binding and tools for Emacs's dynamic modules
{ "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"}Emacs Module in Rust
Section titled “Emacs Module in Rust”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")Example Modules
Section titled “Example Modules”- emacs-tree-sitter: Binding for tree-sitter, an incremental parsing tool.
- pullover: Use Emacs to edit text for other macOS apps.
- [test-module]!(test-module).
- emacs-rs-examples.
- magit-libgit2: Experimental attempt to speed up magit using libgit2.
Development
Section titled “Development”- 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.