Skip to content

butterfingres/rem

Repository files navigation

Emacs Module in Rust

User Guide | Change Log

This provides a high-level binding to emacs-module, Emacs's support for dynamic modules.

Code for a minimal module looks like this:

use rem::{defun, Env, Result, Value};

rem::plugin_is_GPL_compatible!();

#[rem::module(name = "greeting")]
fn init(env: &Env) -> Result<()> {
    env.lambda(&SayHello, None)?.fset("greeting-say-hello")?;
    Ok(())
}

#[defun]
fn say_hello(env: &Env, name: String) -> Result<Value<'_>> {
    env.message(&format!("Hello, {}!", name))
}
(require 'greeting)
(greeting-say-hello "Emacs")

Development

Building

cargo check

Testing:

cargo test --workspace

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors