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] [package]
name = "api" name = "api"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2024"
[dependencies] [dependencies]
pluralkit_models = { path = "../models" } pluralkit_models = { path = "../models" }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -148,11 +148,15 @@ lazy_static! {
// hacks // hacks
if let Ok(var) = std::env::var("NOMAD_ALLOC_INDEX") if let Ok(var) = std::env::var("NOMAD_ALLOC_INDEX")
&& std::env::var("pluralkit__discord__cluster__total_nodes").is_ok() { && 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") if let Ok(var) = std::env::var("STATEFULSET_NAME_FOR_INDEX")
&& std::env::var("pluralkit__discord__cluster__total_nodes").is_ok() { && 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() Arc::new(Config::builder()

View file

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

View file

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

View file

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

View file

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