23 releases (13 breaking)

0.14.1 Oct 14, 2020
0.14.0 Apr 18, 2020
0.13.0 Mar 11, 2020
0.12.0 Dec 4, 2019
0.1.0 May 23, 2016

#25 in FFI

Download history 86/week @ 2020-07-07 109/week @ 2020-07-14 67/week @ 2020-07-21 62/week @ 2020-07-28 57/week @ 2020-08-04 95/week @ 2020-08-11 77/week @ 2020-08-18 68/week @ 2020-08-25 80/week @ 2020-09-01 77/week @ 2020-09-08 53/week @ 2020-09-15 76/week @ 2020-09-22 38/week @ 2020-09-29 48/week @ 2020-10-06 124/week @ 2020-10-13 98/week @ 2020-10-20

303 downloads per month
Used in emacs-rs-module

BSD-3-Clause

76KB
1.5K SLoC

Emacs Module in Rust

crates.io doc.rs Build Status Build Status

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

~1–3MB
~66K SLoC