31 个版本 (18 个重大更改)

0.19.0 2024 年 3 月 16 日
0.18.0 2021 年 9 月 26 日
0.17.0 2021 年 3 月 9 日
0.15.0 2020 年 12 月 27 日
0.1.0 2016 年 5 月 23 日

#46FFI

Download history 202/week @ 2024-04-22 152/week @ 2024-04-29 152/week @ 2024-05-06 135/week @ 2024-05-13 161/week @ 2024-05-20 169/week @ 2024-05-27 172/week @ 2024-06-03 241/week @ 2024-06-10 175/week @ 2024-06-17 248/week @ 2024-06-24 286/week @ 2024-07-01 196/week @ 2024-07-08 223/week @ 2024-07-15 164/week @ 2024-07-22 167/week @ 2024-07-29 175/week @ 2024-08-05

766 每月下载量
3 crates 中使用

BSD-3-Clause

100KB
2K SLoC

Rust 中的 Emacs 模块

crates.io doc.rs Azure Pipelines GitHub Actions

用户指南 | 变更日志 | 示例

此工具提供了对 emacs-module 的高层级绑定,这是 Emacs 对动态模块的支持。

一个最小模块的代码如下

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

示例模块

开发

  • 构建
    bin/build
    
  • 测试
    bin/test
    
  • 持续测试(需要 cargo-watch
    bin/test watch
    

在 Windows 上,使用 PowerShell 运行相应的 .ps1 脚本。

依赖项

~2MB
~47K SLoC