#annotations #generate #lua #type #lsp #send-message #class-annotation

alua

A Rust library for generating lua lsp annotations from Rust types

5 releases

0.1.4 Jun 10, 2024
0.1.3 May 8, 2024
0.1.2 Apr 24, 2024
0.1.1 Apr 23, 2024
0.1.0 Apr 23, 2024

#111 in FFI

Download history 391/week @ 2024-04-22 26/week @ 2024-04-29 95/week @ 2024-05-06 4/week @ 2024-05-13 13/week @ 2024-05-20 193/week @ 2024-06-10

206 downloads per month

MIT license

7KB
116 lines

alua

A Rust library for generating luals annotations from Rust types.

Example

use alua::*;

#[derive(ClassAnnotation)]
#[alua(fields = [
    "method fun(self: Example, message: string) - Send a message",
])]
struct Example {
    /// test
    #[allow(unused)]
    field: u32,
}

fn main() {
    print!("{}", Example::class_annotation());
}

This produces the following output:

--- @class Example
--- @field field integer - test
--- @field method fun(self: Example, message: string) - Send a message

Dependencies

~0.6–1MB
~24K SLoC