luars 0.17.0

A library for lua 5.5 runtime implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{cell::RefCell, collections::HashMap, path::PathBuf, time::SystemTime};

use crate::{ProtoPtr, compiler::LuaLanguageLevel};

#[derive(Clone)]
pub struct SharedFileProtoEntry {
    pub proto: ProtoPtr,
    pub len: u64,
    pub modified: Option<SystemTime>,
    pub version: LuaLanguageLevel,
}

thread_local! {
    pub static SHARED_FILE_PROTO_CACHE: RefCell<HashMap<PathBuf, SharedFileProtoEntry>> =
        RefCell::new(HashMap::new());
}