add nixide workspace project

This commit is contained in:
do butterflies cry? 2026-03-13 23:48:55 +10:00
parent 4d4d54e4d3
commit c1181fdb2a
Signed by: cry
GPG key ID: F68745A836CA0412
3 changed files with 42 additions and 1 deletions

View file

@ -1,7 +1,7 @@
[workspace]
resolver = "3"
members = [
# "nixide",
"nixide",
"nixide-sys"
]

27
nixide/Cargo.toml Normal file
View file

@ -0,0 +1,27 @@
[package]
name = "nixide"
description = "Safe & oxidized bindings to the Nix API"
version = "0.1.0"
readme = "../README.md"
license = "GPL-3.0"
repository = "https://codeberg.org/luminary/nixide"
authors = [
"_cry64 <them@dobutterfliescry.net>",
"foxxyora <foxxyora@noreply.codeberg.org>"
]
edition = "2024"
[lib]
path = "src/lib.rs"
[features]
default = ["util"]
expr = []
fetchers = []
flakes = []
store = []
util = []
gc = []
[dependencies]
nixide-sys = { path = "../nixide-sys", version = "0.1.0" }

14
nixide/src/lib.rs Normal file
View 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);
}
}