#lua #annotations #lsp #generate #type #field #testing

alua

A Rust library for generating lua lsp annotations from Rust types

8 releases

0.2.0 Oct 28, 2024
0.1.6 Oct 28, 2024
0.1.4 Jun 10, 2024
0.1.3 May 8, 2024
0.1.2 Apr 24, 2024

#147 in Text editors

Download history 11/week @ 2024-09-21 5/week @ 2024-09-28 1/week @ 2024-10-05 5/week @ 2024-10-12 2/week @ 2024-10-19 397/week @ 2024-10-26 59/week @ 2024-11-02 4/week @ 2024-11-09 12/week @ 2024-11-16 4/week @ 2024-11-23

86 downloads per month

MIT license

9KB
135 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
~23K SLoC