🔧 restructuring examples dirs

This commit is contained in:
noib3 2022-09-24 19:34:46 +02:00
parent 15091d31bc
commit 91f981c64e
No known key found for this signature in database
GPG key ID: 7AF92216C504A017
24 changed files with 19 additions and 25 deletions

View file

@ -5,9 +5,9 @@ members = [
"nvim-types",
"oxi-module",
"oxi-test",
"examples/*"
]
exclude = [
"examples",
"tests",
]

8
examples/libuv.rs Normal file
View file

@ -0,0 +1,8 @@
use nvim_oxi::{self as oxi, r#loop};
#[oxi::module]
fn libuv() -> oxi::Result<()> {
oxi::print!("hey there");
Ok(())
}

View file

@ -22,14 +22,21 @@ nightly = ["nvim-types/nightly"]
test = ["dep:oxi-test"]
[dependencies]
nvim-types = { version = "0.1", path = "../nvim-types", features = ["serde"] }
oxi-module = { version = "0.1", path = "../oxi-module" }
oxi-test = { version = "0.1", path = "../oxi-test", optional = true }
derive_builder = "0.11"
libc = "0.2"
libuv-sys2 = { version = "1.43", optional = true }
mlua = { version = "0.8", optional = true }
nvim-types = { version = "0.1", path = "../nvim-types", features = ["serde"] }
once_cell = "1.12"
oxi-module = { version = "0.1", path = "../oxi-module" }
oxi-test = { version = "0.1", path = "../oxi-test", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_repr = "0.1"
thiserror = "1.0"
[[example]]
name = "libuv"
path = "../examples/libuv.rs"
crate-type = ["cdylib"]
required-features = ["loop"]

View file

@ -1,21 +0,0 @@
[target.x86_64-pc-windows-msvc]
rustflags = [
"-C", "link-arg=/FORCE:UNRESOLVED",
]
[target.aarch64-pc-windows-msvc]
rustflags = [
"-C", "link-arg=/FORCE:UNRESOLVED",
]
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]