From 0b465bdacb801eaca96ff898d0ede24ccd8b6653 Mon Sep 17 00:00:00 2001 From: elipeter Date: Tue, 17 Jun 2025 10:55:50 +0200 Subject: [PATCH] Renamed project from "Nano" to "Nyx" across codebase and configuration files. --- Cargo.lock | 64 ++++++++++++++++++++++----------------------- Cargo.toml | 4 +-- src/cli.rs | 2 +- src/main.rs | 4 +-- src/utils/config.rs | 10 +++---- 5 files changed, 41 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 324afaf6..1d954768 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,38 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Nano" -version = "0.1.0" -dependencies = [ - "blake3", - "clap", - "crossbeam-channel", - "directories", - "filetime", - "ignore", - "log", - "num_cpus", - "once_cell", - "rusqlite", - "serde", - "tempfile", - "toml", - "tracing", - "tracing-appender", - "tracing-subscriber", - "tree-sitter", - "tree-sitter-c", - "tree-sitter-cpp", - "tree-sitter-go", - "tree-sitter-java", - "tree-sitter-javascript", - "tree-sitter-php", - "tree-sitter-python", - "tree-sitter-rust", - "tree-sitter-typescript", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -507,6 +475,38 @@ dependencies = [ "libc", ] +[[package]] +name = "nyx" +version = "0.1.0" +dependencies = [ + "blake3", + "clap", + "crossbeam-channel", + "directories", + "filetime", + "ignore", + "log", + "num_cpus", + "once_cell", + "rusqlite", + "serde", + "tempfile", + "toml", + "tracing", + "tracing-appender", + "tracing-subscriber", + "tree-sitter", + "tree-sitter-c", + "tree-sitter-cpp", + "tree-sitter-go", + "tree-sitter-java", + "tree-sitter-javascript", + "tree-sitter-php", + "tree-sitter-python", + "tree-sitter-rust", + "tree-sitter-typescript", +] + [[package]] name = "once_cell" version = "1.21.3" diff --git a/Cargo.toml b/Cargo.toml index f08c8953..6e53f2c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "Nano" +name = "nyx" version = "0.1.0" edition = "2024" @@ -12,7 +12,6 @@ clap = { version = "4.5.40", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] } toml = "0.8.23" tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json", "ansi","time"] } -tracing-appender = "0.2.3" tracing = "0.1.41" num_cpus = "1.17.0" @@ -33,4 +32,3 @@ crossbeam-channel = "0.5.15" blake3 = "1.8.2" filetime = "0.2.25" once_cell = "1.21.3" -log = "0.4.27" diff --git a/src/cli.rs b/src/cli.rs index 3055fa13..2f1da4ec 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,7 +1,7 @@ use clap::{Parser, Subcommand}; #[derive(Parser)] -#[command(name = "nano")] +#[command(name = "nyx")] #[command(about = "A fast vulnerability scanner with project indexing")] #[command(version)] pub struct Cli { diff --git a/src/main.rs b/src/main.rs index 8920bdef..472a943c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,7 @@ use tracing_subscriber::fmt::time; // use tracing_appender::non_blocking; fn init_tracing() { - // let file_appender = RollingFileAppender::new(Rotation::HOURLY, "logs", "nano-scanner.log"); + // let file_appender = RollingFileAppender::new(Rotation::HOURLY, "logs", "nyx-scanner.log"); // let (file_writer, guard) = non_blocking(file_appender); let fmt_layer = fmt::layer() @@ -44,7 +44,7 @@ fn main() -> Result<(), Box> { tracing::debug!("CLI starting up"); let cli = Cli::parse(); - let proj_dirs = ProjectDirs::from("dev", "ecpeter23", "nano") + let proj_dirs = ProjectDirs::from("dev", "ecpeter23", "nyx") .ok_or("Unable to determine project directories")?; let config_dir = proj_dirs.config_dir(); diff --git a/src/utils/config.rs b/src/utils/config.rs index 7ac2fe94..dcf4fcb3 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -176,12 +176,12 @@ impl Config { ) -> Result> { let mut config = Config::default(); - let default_config_path = config_dir.join("nano.conf"); + let default_config_path = config_dir.join("nyx.conf"); if !default_config_path.exists() { create_example_config(config_dir)?; } - let user_config_path = config_dir.join("nano.local"); + let user_config_path = config_dir.join("nyx.local"); if user_config_path.exists() { let user_config_content = fs::read_to_string(&user_config_path)?; let user_config: Config = toml::from_str(&user_config_content)?; @@ -200,16 +200,16 @@ impl Config { fn create_example_config( config_dir: &Path, ) -> Result<(), Box> { - let example_path = config_dir.join("nano.conf"); + let example_path = config_dir.join("nyx.conf"); let default_config = Config::default(); let toml_content = toml::to_string_pretty(&default_config)?; // Add comments to make it user-friendly let commented_content = format!( - "# Nano Vulnerability Scanner Configuration\n\ + "# nnyx Vulnerability Scanner Configuration\n\ # YOU SHOULD NOT MODIFY THIS FILE.\n\ - # Create/modify 'nano.local' to set configs\n\ + # Create/modify 'nyx.local' to set configs\n\ # Only include the sections you want to override\n\n{}", toml_content );