22 releases (13 breaking)

✓ Uses Rust 2018 edition

0.14.0 Apr 18, 2020
0.13.0 Mar 11, 2020
0.12.3 Feb 18, 2020
0.12.0 Dec 4, 2019
0.1.0 May 23, 2016

#15 in FFI

Download history 167/week @ 2020-03-23 100/week @ 2020-03-30 121/week @ 2020-04-06 169/week @ 2020-04-13 174/week @ 2020-04-20 111/week @ 2020-04-27 71/week @ 2020-05-04 62/week @ 2020-05-11 47/week @ 2020-05-18 69/week @ 2020-05-25 127/week @ 2020-06-01 97/week @ 2020-06-08 78/week @ 2020-06-15 77/week @ 2020-06-22 89/week @ 2020-06-29 92/week @ 2020-07-06

591 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–2.9MB
~62K SLoC