Renamed project from "Nano" to "Nyx" across codebase and configuration files.

This commit is contained in:
elipeter 2025-06-17 10:55:50 +02:00
parent 7bfce3ad7f
commit 0b465bdacb
5 changed files with 41 additions and 43 deletions

64
Cargo.lock generated
View file

@ -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"

View file

@ -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"

View file

@ -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 {

View file

@ -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<dyn std::error::Error>> {
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();

View file

@ -176,12 +176,12 @@ impl Config {
) -> Result<Self, Box<dyn std::error::Error>> {
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<dyn std::error::Error>> {
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
);