rename conduit to conduwuit finally

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-14 21:58:01 -05:00
parent c6bf8f5ea1
commit 0317cc8cc5
No known key found for this signature in database
277 changed files with 559 additions and 551 deletions

View file

@ -1,7 +1,6 @@
[package]
# TODO: when can we rename to conduwuit?
name = "conduit"
default-run = "conduit"
name = "conduwuit"
default-run = "conduwuit"
authors.workspace = true
categories.workspace = true
description.workspace = true
@ -48,49 +47,49 @@ default = [
]
brotli_compression = [
"conduit-api/brotli_compression",
"conduit-core/brotli_compression",
"conduit-router/brotli_compression",
"conduit-service/brotli_compression",
"conduwuit-api/brotli_compression",
"conduwuit-core/brotli_compression",
"conduwuit-router/brotli_compression",
"conduwuit-service/brotli_compression",
]
console = [
"conduit-service/console",
"conduwuit-service/console",
]
#dev_release_log_level = [
# "conduit-admin/dev_release_log_level",
# "conduit-api/dev_release_log_level",
# "conduit-core/dev_release_log_level",
# "conduit-database/dev_release_log_level",
# "conduit-router/dev_release_log_level",
# "conduit-service/dev_release_log_level",
# "conduwuit-admin/dev_release_log_level",
# "conduwuit-api/dev_release_log_level",
# "conduwuit-core/dev_release_log_level",
# "conduwuit-database/dev_release_log_level",
# "conduwuit-router/dev_release_log_level",
# "conduwuit-service/dev_release_log_level",
#]
direct_tls = [
"conduit-router/direct_tls"
"conduwuit-router/direct_tls"
]
element_hacks = [
"conduit-api/element_hacks",
"conduit-service/element_hacks",
"conduwuit-api/element_hacks",
"conduwuit-service/element_hacks",
]
gzip_compression = [
"conduit-api/gzip_compression",
"conduit-router/gzip_compression",
"conduit-service/gzip_compression",
"conduwuit-api/gzip_compression",
"conduwuit-router/gzip_compression",
"conduwuit-service/gzip_compression",
]
hardened_malloc = [
"conduit-core/hardened_malloc",
"conduwuit-core/hardened_malloc",
]
io_uring = [
"conduit-database/io_uring",
"conduwuit-database/io_uring",
]
jemalloc = [
"conduit-core/jemalloc",
"conduit-database/jemalloc",
"conduwuit-core/jemalloc",
"conduwuit-database/jemalloc",
]
jemalloc_prof = [
"conduit-core/jemalloc_prof",
"conduwuit-core/jemalloc_prof",
]
jemalloc_stats = [
"conduit-core/jemalloc_stats",
"conduwuit-core/jemalloc_stats",
]
perf_measurements = [
"dep:opentelemetry",
@ -98,8 +97,8 @@ perf_measurements = [
"dep:tracing-opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-jaeger",
"conduit-core/perf_measurements",
"conduit-core/sentry_telemetry",
"conduwuit-core/perf_measurements",
"conduwuit-core/sentry_telemetry",
]
# increases performance, reduces build times, and reduces binary size by not compiling or
# genreating code for log level filters that users will generally not use (debug and trace)
@ -108,22 +107,22 @@ release_max_log_level = [
"tracing/release_max_level_info",
"log/max_level_trace",
"log/release_max_level_info",
"conduit-admin/release_max_log_level",
"conduit-api/release_max_log_level",
"conduit-core/release_max_log_level",
"conduit-database/release_max_log_level",
"conduit-router/release_max_log_level",
"conduit-service/release_max_log_level",
"conduwuit-admin/release_max_log_level",
"conduwuit-api/release_max_log_level",
"conduwuit-core/release_max_log_level",
"conduwuit-database/release_max_log_level",
"conduwuit-router/release_max_log_level",
"conduwuit-service/release_max_log_level",
]
sentry_telemetry = [
"dep:sentry",
"dep:sentry-tracing",
"dep:sentry-tower",
"conduit-core/sentry_telemetry",
"conduit-router/sentry_telemetry",
"conduwuit-core/sentry_telemetry",
"conduwuit-router/sentry_telemetry",
]
systemd = [
"conduit-router/systemd",
"conduwuit-router/systemd",
]
# enable the tokio_console server ncompatible with release_max_log_level
tokio_console = [
@ -131,19 +130,19 @@ tokio_console = [
"tokio/tracing",
]
zstd_compression = [
"conduit-api/zstd_compression",
"conduit-core/zstd_compression",
"conduit-database/zstd_compression",
"conduit-router/zstd_compression",
"conduwuit-api/zstd_compression",
"conduwuit-core/zstd_compression",
"conduwuit-database/zstd_compression",
"conduwuit-router/zstd_compression",
]
[dependencies]
conduit-admin.workspace = true
conduit-api.workspace = true
conduit-core.workspace = true
conduit-database.workspace = true
conduit-router.workspace = true
conduit-service.workspace = true
conduwuit-admin.workspace = true
conduwuit-api.workspace = true
conduwuit-core.workspace = true
conduwuit-database.workspace = true
conduwuit-router.workspace = true
conduwuit-service.workspace = true
tokio.workspace = true
log.workspace = true
@ -184,5 +183,5 @@ hardened_malloc-rs.optional = true
workspace = true
[[bin]]
name = "conduit"
name = "conduwuit"
path = "main.rs"

View file

@ -3,7 +3,7 @@
use std::path::PathBuf;
use clap::Parser;
use conduit::{
use conduwuit::{
config::{Figment, FigmentValue},
err, toml,
utils::available_parallelism,
@ -12,7 +12,7 @@ use conduit::{
/// Commandline arguments
#[derive(Parser, Debug)]
#[clap(version = conduit::version(), about, long_about = None, name = "conduwuit")]
#[clap(version = conduwuit::version(), about, long_about = None, name = "conduwuit")]
pub(crate) struct Args {
#[arg(short, long)]
/// Path to the config TOML file (optional)

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use conduit::{
use conduwuit::{
config::Config,
debug_warn, err,
log::{capture, fmt_span, LogLevelReloadHandles},

View file

@ -6,14 +6,14 @@ mod sentry;
mod server;
mod signal;
extern crate conduit_core as conduit;
extern crate conduwuit_core as conduwuit;
use std::{
sync::{atomic::Ordering, Arc},
time::Duration,
};
use conduit::{debug_info, error, rustc_flags_capture, Error, Result};
use conduwuit::{debug_info, error, rustc_flags_capture, Error, Result};
use server::Server;
use tokio::runtime;
@ -58,14 +58,14 @@ fn main() -> Result<(), Error> {
/// Operate the server normally in release-mode static builds. This will start,
/// run and stop the server within the asynchronous runtime.
#[cfg(not(conduit_mods))]
#[cfg(not(conduwuit_mods))]
#[tracing::instrument(
name = "main",
parent = None,
skip_all
)]
async fn async_main(server: &Arc<Server>) -> Result<(), Error> {
extern crate conduit_router as router;
extern crate conduwuit_router as router;
match router::start(&server.server).await {
Ok(services) => server.services.lock().await.insert(services),
@ -110,7 +110,7 @@ async fn async_main(server: &Arc<Server>) -> Result<(), Error> {
/// Operate the server in developer-mode dynamic builds. This will start, run,
/// and hot-reload portions of the server as-needed before returning for an
/// actual shutdown. This is not available in release-mode or static builds.
#[cfg(conduit_mods)]
#[cfg(conduwuit_mods)]
async fn async_main(server: &Arc<Server>) -> Result<(), Error> {
let mut starts = true;
let mut reloads = true;

View file

@ -1,7 +1,7 @@
#![cfg(conduit_mods)]
#![cfg(conduwuit_mods)]
#[unsafe(no_link)]
extern crate conduit_service;
extern crate conduwuit_service;
use std::{
future::Future,
@ -9,13 +9,13 @@ use std::{
sync::{atomic::Ordering, Arc},
};
use conduit::{debug, error, mods, Error, Result};
use conduit_service::Services;
use conduwuit::{debug, error, mods, Error, Result};
use conduwuit_service::Services;
use crate::Server;
type StartFuncResult = Pin<Box<dyn Future<Output = Result<Arc<Services>>> + Send>>;
type StartFuncProto = fn(&Arc<conduit::Server>) -> StartFuncResult;
type StartFuncProto = fn(&Arc<conduwuit::Server>) -> StartFuncResult;
type RunFuncResult = Pin<Box<dyn Future<Output = Result<()>> + Send>>;
type RunFuncProto = fn(&Arc<Services>) -> RunFuncResult;
@ -23,19 +23,19 @@ type RunFuncProto = fn(&Arc<Services>) -> RunFuncResult;
type StopFuncResult = Pin<Box<dyn Future<Output = Result<()>> + Send>>;
type StopFuncProto = fn(Arc<Services>) -> StopFuncResult;
const RESTART_THRESH: &str = "conduit_service";
const RESTART_THRESH: &str = "conduwuit_service";
const MODULE_NAMES: &[&str] = &[
//"conduit_core",
"conduit_database",
"conduit_service",
"conduit_api",
"conduit_admin",
"conduit_router",
//"conduwuit_core",
"conduwuit_database",
"conduwuit_service",
"conduwuit_api",
"conduwuit_admin",
"conduwuit_router",
];
#[cfg(panic_trap)]
conduit::mod_init! {{
conduit::debug::set_panic_trap();
conduwuit::mod_init! {{
conduwuit::debug::set_panic_trap();
}}
pub(crate) async fn run(server: &Arc<Server>, starts: bool) -> Result<(bool, bool), Error> {

View file

@ -2,7 +2,7 @@
use std::{env, os::unix::process::CommandExt, process::Command};
use conduit::{debug, info, utils};
use conduwuit::{debug, info, utils};
#[cold]
pub(super) fn restart() -> ! {

View file

@ -5,7 +5,7 @@ use std::{
sync::{Arc, OnceLock},
};
use conduit::{config::Config, debug, trace};
use conduwuit::{config::Config, debug, trace};
use sentry::{
types::{
protocol::v7::{Context, Event},
@ -43,7 +43,7 @@ fn options(config: &Config) -> ClientOptions {
traces_sample_rate: config.sentry_traces_sample_rate,
debug: cfg!(debug_assertions),
release: sentry::release_name!(),
user_agent: conduit::version::user_agent().into(),
user_agent: conduwuit::version::user_agent().into(),
attach_stacktrace: config.sentry_attach_stacktrace,
before_send: Some(Arc::new(before_send)),
before_breadcrumb: Some(Arc::new(before_breadcrumb)),

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use conduit::{config::Config, info, log::Log, utils::sys, Error, Result};
use conduwuit::{config::Config, info, log::Log, utils::sys, Error, Result};
use tokio::{runtime, sync::Mutex};
use crate::{clap::Args, logging::TracingFlameGuard};
@ -8,18 +8,18 @@ use crate::{clap::Args, logging::TracingFlameGuard};
/// Server runtime state; complete
pub(crate) struct Server {
/// Server runtime state; public portion
pub(crate) server: Arc<conduit::Server>,
pub(crate) server: Arc<conduwuit::Server>,
pub(crate) services: Mutex<Option<Arc<conduit_service::Services>>>,
pub(crate) services: Mutex<Option<Arc<conduwuit_service::Services>>>,
_tracing_flame_guard: TracingFlameGuard,
#[cfg(feature = "sentry_telemetry")]
_sentry_guard: Option<::sentry::ClientInitGuard>,
#[cfg(conduit_mods)]
#[cfg(conduwuit_mods)]
// Module instances; TODO: move to mods::loaded mgmt vector
pub(crate) mods: tokio::sync::RwLock<Vec<conduit::mods::Module>>,
pub(crate) mods: tokio::sync::RwLock<Vec<conduwuit::mods::Module>>,
}
impl Server {
@ -45,11 +45,11 @@ impl Server {
database_path = ?config.database_path,
log_levels = %config.log,
"{}",
conduit::version(),
conduwuit::version(),
);
Ok(Arc::new(Self {
server: Arc::new(conduit::Server::new(
server: Arc::new(conduwuit::Server::new(
config,
runtime.cloned(),
Log {
@ -65,7 +65,7 @@ impl Server {
#[cfg(feature = "sentry_telemetry")]
_sentry_guard: sentry_guard,
#[cfg(conduit_mods)]
#[cfg(conduwuit_mods)]
mods: tokio::sync::RwLock::new(Vec::new()),
}))
}

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use conduit::{debug_error, trace, warn};
use conduwuit::{debug_error, trace, warn};
use tokio::signal;
use super::server::Server;
@ -12,7 +12,7 @@ pub(super) async fn signal(server: Arc<Server>) {
use unix::SignalKind;
const CONSOLE: bool = cfg!(feature = "console");
const RELOADING: bool = cfg!(all(conduit_mods, not(CONSOLE)));
const RELOADING: bool = cfg!(all(conduwuit_mods, not(CONSOLE)));
let mut quit = unix::signal(SignalKind::quit()).expect("SIGQUIT handler");
let mut term = unix::signal(SignalKind::terminate()).expect("SIGTERM handler");