Allow documenting of extern "Lua" functions

This commit is contained in:
2025-06-24 22:23:26 +10:00
parent 1aa9b4aa02
commit 122ef04b16
2 changed files with 128 additions and 36 deletions

View File

@@ -6,6 +6,23 @@ use std::{
hash::{Hash, Hasher},
};
#[allow(non_camel_case_types)]
pub mod stub_types {
pub struct any;
pub struct nil;
pub struct boolean;
pub struct lightuserdata;
pub struct number;
pub struct integer;
pub struct string;
pub struct table;
pub struct function;
pub struct userdata;
pub struct thread;
pub struct cdata;
pub struct variadic;
}
pub fn type_id<T: 'static>() -> u64 {
let mut hash = FxHasher::default();
TypeId::of::<T>().hash(&mut hash);