build: define rust-toolchain.toml and point to 'latest' nightly, fix rust crates on it

This commit is contained in:
dusk 2025-08-13 02:42:53 +03:00
parent 5d57bd9320
commit 4a865b45cd
No known key found for this signature in database
13 changed files with 16 additions and 19 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "api"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
pluralkit_models = { path = "../models" }

View file

@ -1,5 +1,3 @@
#![feature(let_chains)]
use auth::{AuthState, INTERNAL_APPID_HEADER, INTERNAL_SYSTEMID_HEADER};
use axum::{
body::Body,

View file

@ -1,7 +1,7 @@
[package]
name = "command_parser"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
lazy_static = { workspace = true }

View file

@ -1,4 +1,3 @@
#![feature(let_chains)]
#![feature(anonymous_lifetime_in_impl_trait)]
pub mod command;

View file

@ -1,7 +1,7 @@
[package]
name = "gateway"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
anyhow = { workspace = true }

View file

@ -1,6 +1,5 @@
#![feature(let_chains)]
#![feature(duration_constructors_lite)]
#![feature(if_let_guard)]
#![feature(duration_constructors)]
use chrono::Timelike;
use discord::gateway::cluster_config;

View file

@ -1,7 +1,7 @@
[package]
name = "gdpr_worker"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
libpk = { path = "../libpk" }

View file

@ -1,7 +1,7 @@
[package]
name = "libpk"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
anyhow = { workspace = true }
@ -12,7 +12,7 @@ pk_macros = { path = "../macros" }
sentry = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
sqlx = { workspace = true }
sqlx = { workspace = true, features = ["chrono"] }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true}

View file

@ -148,11 +148,15 @@ lazy_static! {
// hacks
if let Ok(var) = std::env::var("NOMAD_ALLOC_INDEX")
&& std::env::var("pluralkit__discord__cluster__total_nodes").is_ok() {
std::env::set_var("pluralkit__discord__cluster__node_id", var);
unsafe {
std::env::set_var("pluralkit__discord__cluster__node_id", var);
}
}
if let Ok(var) = std::env::var("STATEFULSET_NAME_FOR_INDEX")
&& std::env::var("pluralkit__discord__cluster__total_nodes").is_ok() {
std::env::set_var("pluralkit__discord__cluster__node_id", var.split("-").last().unwrap());
unsafe {
std::env::set_var("pluralkit__discord__cluster__node_id", var.split("-").last().unwrap());
}
}
Arc::new(Config::builder()

View file

@ -1,4 +1,3 @@
#![feature(let_chains)]
use std::net::SocketAddr;
use metrics_exporter_prometheus::PrometheusBuilder;

View file

@ -1,7 +1,7 @@
[package]
name = "migrate"
version = "0.1.0"
edition = "2021"
edition = "2024"
[dependencies]
libpk = { path = "../libpk" }

View file

@ -1,5 +1,3 @@
#![feature(let_chains)]
use tracing::info;
include!(concat!(env!("OUT_DIR"), "/data.rs"));

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-08-20"
components = ["rust-src", "rustfmt"]
channel = "nightly-2025-08-09"
components = ["rust-src", "rustfmt"]