Crates.io | alua |
lib.rs | alua |
version | 0.2.0 |
source | src |
created_at | 2024-04-23 15:12:24.446607 |
updated_at | 2024-10-28 14:44:16.159851 |
description | A Rust library for generating lua lsp annotations from Rust types |
homepage | |
repository | https://github.com/eievui5/alua |
max_upload_size | |
id | 1217707 |
size | 23,568 |
A Rust library for generating luals annotations from Rust types.
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