add cargo workspace
This commit is contained in:
parent
87612df7b6
commit
969cb97a18
5 changed files with 323 additions and 1 deletions
32
nixide-sys/Cargo.toml
Normal file
32
nixide-sys/Cargo.toml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[package]
|
||||
name = "nixide-sys"
|
||||
description = "Unsafe direct FFI bindings to libnix C API"
|
||||
version = "0.1.0"
|
||||
license = "GPL-3.0"
|
||||
license-file = "../LICENSE"
|
||||
authors = ["_cry64 <them@dobutterfliescry.net>",
|
||||
"foxxyora <foxxyora@noreply.codeberg.org>"]
|
||||
repository = "https://codeberg.org/luminary/nixide"
|
||||
edition = "2024"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
targets = [ "x86_64-unknown-linux-gnu" ]
|
||||
|
||||
[lib]
|
||||
path = "lib.rs"
|
||||
|
||||
[features]
|
||||
default = ["util"]
|
||||
expr = []
|
||||
fetchers = []
|
||||
flakes = []
|
||||
store = []
|
||||
util = []
|
||||
gc = []
|
||||
|
||||
[build-dependencies]
|
||||
bindgen = { default-features = false, features = [ "logging", "runtime" ], version = "0.72.1" }
|
||||
doxygen-bindgen = "0.1.3"
|
||||
pkg-config.workspace = true
|
||||
cc.workspace = true
|
||||
|
||||
14
nixide-sys/lib.rs
Normal file
14
nixide-sys/lib.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
pub fn add(left: u64, right: u64) -> u64 {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue