yazi/yazi-plugin/src/utils/target.rs
2024-11-13 11:38:11 +08:00

13 lines
317 B
Rust

use mlua::{Function, Lua};
use super::Utils;
impl Utils {
pub(super) fn target_os(lua: &Lua) -> mlua::Result<Function> {
lua.create_function(|_, ()| Ok(std::env::consts::OS))
}
pub(super) fn target_family(lua: &Lua) -> mlua::Result<Function> {
lua.create_function(|_, ()| Ok(std::env::consts::FAMILY))
}
}