aaaaaaaaaaaaaaaaaaaaaa

This commit is contained in:
delta 2023-04-24 23:58:06 +02:00
commit 8ca99dd8ee
5 changed files with 34 additions and 0 deletions

14
Cargo.toml Normal file
View 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
View file

@ -0,0 +1,4 @@
--mod-version:3
package.cpath = package.cpath .. ";" .. USERDIR .. "/plugins/braindead/?.so"
require "libbraindead"

1
libbraindead.so Symbolic link
View file

@ -0,0 +1 @@
target/debug/libbraindead.so

4
rustfmt.toml Normal file
View file

@ -0,0 +1,4 @@
imports_layout = "Vertical"
unstable_features = true
group_imports = "StdExternalCrate"
imports_granularity = "Crate"

11
src/lib.rs Normal file
View 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()
}