17 releases (11 breaking)

✓ Uses Rust 2018 edition

new 0.12.0 Dec 4, 2019
0.11.0 Aug 5, 2019
0.10.3 Jul 24, 2019
0.6.0 Mar 26, 2019
0.1.0 May 23, 2016

#16 in FFI

Download history 145/week @ 2019-08-21 71/week @ 2019-08-28 81/week @ 2019-09-04 103/week @ 2019-09-11 326/week @ 2019-09-18 123/week @ 2019-09-25 78/week @ 2019-10-02 89/week @ 2019-10-09 100/week @ 2019-10-16 176/week @ 2019-10-23 118/week @ 2019-10-30 46/week @ 2019-11-06 95/week @ 2019-11-13 57/week @ 2019-11-20 123/week @ 2019-11-27

490 downloads per month
Used in 1 crate

BSD-3-Clause

62KB
1K 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.1–3MB
~63K SLoC