31 releases (18 breaking)

0.19.0 Mar 16, 2024
0.18.0 Sep 26, 2021
0.17.0 Mar 9, 2021
0.15.0 Dec 27, 2020
0.1.0 May 23, 2016

#68 in FFI

Download history 206/week @ 2024-11-17 202/week @ 2024-11-24 185/week @ 2024-12-01 325/week @ 2024-12-08 184/week @ 2024-12-15 110/week @ 2024-12-22 102/week @ 2024-12-29 177/week @ 2025-01-05 241/week @ 2025-01-12 202/week @ 2025-01-19 193/week @ 2025-01-26 307/week @ 2025-02-02 243/week @ 2025-02-09 237/week @ 2025-02-16 279/week @ 2025-02-23 168/week @ 2025-03-02

958 downloads per month
Used in 4 crates

BSD-3-Clause

100KB
2K SLoC

Emacs Module in Rust

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")

Example Modules

Development

  • Building:
    bin/build
    
  • Testing:
    bin/test
    
  • Continuous testing (requires cargo-watch):
    bin/test watch
    

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

Dependencies

~2.5MB
~51K SLoC