aaaaaaaaaaaaaaaaaaaaaa
This commit is contained in:
commit
8ca99dd8ee
14
Cargo.toml
Normal file
14
Cargo.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[package]
|
||||
name = "braindead"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
log = { version = "0.4.17", features = [ "serde" ] }
|
||||
mlua = { git = "https://github.com/khvzak/mlua", features = [ "lua54", "module"] }
|
||||
once_cell = "1.17.1"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
4
init.lua
Normal file
4
init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
--mod-version:3
|
||||
|
||||
package.cpath = package.cpath .. ";" .. USERDIR .. "/plugins/braindead/?.so"
|
||||
require "libbraindead"
|
1
libbraindead.so
Symbolic link
1
libbraindead.so
Symbolic link
|
@ -0,0 +1 @@
|
|||
target/debug/libbraindead.so
|
4
rustfmt.toml
Normal file
4
rustfmt.toml
Normal file
|
@ -0,0 +1,4 @@
|
|||
imports_layout = "Vertical"
|
||||
unstable_features = true
|
||||
group_imports = "StdExternalCrate"
|
||||
imports_granularity = "Crate"
|
11
src/lib.rs
Normal file
11
src/lib.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
use mlua::prelude::*;
|
||||
|
||||
#[mlua::lua_module]
|
||||
fn libbraindead(lua: &Lua) -> LuaResult<LuaTable> {
|
||||
#[cfg(target_family = "windows")]
|
||||
compile_error!(
|
||||
"Windows is currently not supported. Windows support may be coming in the future"
|
||||
);
|
||||
|
||||
lua.create_table()
|
||||
}
|
Loading…
Reference in a new issue