Skip to content

Commit

Permalink
Refactor to start extracting things out to insanity-core
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaschan committed Sep 4, 2024
1 parent 8807b6d commit 426b263
Show file tree
Hide file tree
Showing 29 changed files with 4,622 additions and 104 deletions.
58 changes: 27 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 4 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
[package]
name = "insanity"
version = "0.1.0"
authors = ["Nicolas Chan <[email protected]>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
async-trait = "0.1.77"
bincode = "1.3.3"
clap = { version = "^4.5.3", features = ["derive"] }
cpal = "0.13.5"
nnnoiseless = "=0.3.0"
serde = { version = "1.0.197", features = ["derive"] }
tokio = { version = "1", features = ["full"] }
opus = "0.3.0"
send_safe = { git = "https://github.com/nicolaschan/send_safe.git" }
uuid = { version = "1.7", features = ["serde", "v4"] }
dirs = "5.0.1"
serde_json = "1.0.114"
rubato = "0.10"
insanity-tui = { path = "insanity-tui" }
sha2 = "0.10.8"
whoami = "1.5.1"
sled = "0.34.7"
log = "0.4"
fern = "0.6.2"
chrono = "0.4"
veq = { git = "https://github.com/nicolaschan/udpp.git" }
baybridge = { git = "https://github.com/nicolaschan/baybridge.git" }
itertools = "0.12.1"
anyhow = "1.0.82"
tokio-util = { version = "0.7.10", features = ["full"] }
bon = "2.1.0"
argon2 = "0.5.3"
chacha20poly1305 = "0.10.1"
blake3 = "1.5.4"
ed25519-dalek = { version = "2.1.1", features = ["serde"] }
ecoji = "1.0.0"
[workspace]
members = ["insanity-core", "insanity-native-tui-app", "insanity-tui-adapter"]
default-members = ["insanity-native-tui-app"]
resolver = "2"
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
lockFile = ./Cargo.lock;
allowBuiltinFetchGit = true;
};
cargoBuildFlags = [
"--bin" "insanity"
];

nativeBuildInputs = [pkgs.pkg-config pkgs.perl pkgs.cmake];
buildInputs = [
# Add your build dependencies here, for example:
pkgs.openssl
pkgs.libopus
pkgs.alsa-lib
Expand Down
6 changes: 6 additions & 0 deletions insanity-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "insanity-core"
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions insanity-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 426b263

Please sign in to comment.