feat: scaffold Rust/Axum backend
This commit is contained in:
2866
backend/Cargo.lock
generated
Normal file
2866
backend/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
backend/Cargo.toml
Normal file
23
backend/Cargo.toml
Normal file
@@ -0,0 +1,23 @@
|
||||
[package]
|
||||
name = "attendance"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
axum = { version = "0.7", features = ["macros"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio", "macros", "migrate"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
jsonwebtoken = "9"
|
||||
bcrypt = "0.15"
|
||||
tower-http = { version = "0.5", features = ["fs", "cors"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
rand = "0.8"
|
||||
thiserror = "1"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tower = { version = "0.4", features = ["util"] }
|
||||
http-body-util = "0.1"
|
||||
1
backend/src/auth.rs
Normal file
1
backend/src/auth.rs
Normal file
@@ -0,0 +1 @@
|
||||
// auth — populated in Task 4
|
||||
5
backend/src/db.rs
Normal file
5
backend/src/db.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
pub async fn init() -> Result<SqlitePool, sqlx::Error> {
|
||||
todo!()
|
||||
}
|
||||
30
backend/src/error.rs
Normal file
30
backend/src/error.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use axum::{http::StatusCode, response::{IntoResponse, Response}, Json};
|
||||
use serde_json::json;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum AppError {
|
||||
#[error("database error: {0}")]
|
||||
Db(#[from] sqlx::Error),
|
||||
#[error("not found")]
|
||||
NotFound,
|
||||
#[error("conflict: {0}")]
|
||||
Conflict(String),
|
||||
#[error("unauthorized")]
|
||||
Unauthorized,
|
||||
#[error("bad request: {0}")]
|
||||
BadRequest(String),
|
||||
}
|
||||
|
||||
impl IntoResponse for AppError {
|
||||
fn into_response(self) -> Response {
|
||||
let (status, msg) = match &self {
|
||||
AppError::Db(_) => (StatusCode::INTERNAL_SERVER_ERROR, "internal error".into()),
|
||||
AppError::NotFound => (StatusCode::NOT_FOUND, "not found".into()),
|
||||
AppError::Conflict(m) => (StatusCode::CONFLICT, m.clone()),
|
||||
AppError::Unauthorized => (StatusCode::UNAUTHORIZED, "unauthorized".into()),
|
||||
AppError::BadRequest(m) => (StatusCode::BAD_REQUEST, m.clone()),
|
||||
};
|
||||
(status, Json(json!({"error": msg}))).into_response()
|
||||
}
|
||||
}
|
||||
21
backend/src/main.rs
Normal file
21
backend/src/main.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
mod db;
|
||||
mod error;
|
||||
mod models;
|
||||
mod auth;
|
||||
mod routes;
|
||||
|
||||
use axum::Router;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(EnvFilter::from_default_env())
|
||||
.init();
|
||||
|
||||
let pool = db::init().await.expect("db init failed");
|
||||
let app = routes::build(pool);
|
||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
|
||||
tracing::info!("listening on :3000");
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
1
backend/src/models.rs
Normal file
1
backend/src/models.rs
Normal file
@@ -0,0 +1 @@
|
||||
// models — populated in Task 3
|
||||
6
backend/src/routes/mod.rs
Normal file
6
backend/src/routes/mod.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
use axum::Router;
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
pub fn build(_pool: SqlitePool) -> Router {
|
||||
Router::new()
|
||||
}
|
||||
1
backend/target/.rustc_info.json
Normal file
1
backend/target/.rustc_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":10482382160403759334,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/mpuchstein/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.94.0 (4a4ef493e 2026-03-02)\nbinary: rustc\ncommit-hash: 4a4ef493e3a1488c6e321570238084b38948f6db\ncommit-date: 2026-03-02\nhost: x86_64-unknown-linux-gnu\nrelease: 1.94.0\nLLVM version: 21.1.8\n","stderr":""}},"successes":{}}
|
||||
3
backend/target/CACHEDIR.TAG
Normal file
3
backend/target/CACHEDIR.TAG
Normal file
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
0
backend/target/debug/.cargo-lock
Normal file
0
backend/target/debug/.cargo-lock
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
4ed5678f4be5bf92
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"getrandom\", \"runtime-rng\", \"std\"]","declared_features":"[\"atomic-polyfill\", \"compile-time-rng\", \"const-random\", \"default\", \"getrandom\", \"nightly-arm-aes\", \"no-rng\", \"runtime-rng\", \"serde\", \"std\"]","target":8470944000320059508,"profile":15657897354478470176,"path":8938348012707122617,"deps":[[966925859616469517,"build_script_build",false,13576839688921657579],[3612005756660025491,"zerocopy",false,2485866205691218444],[5855319743879205494,"once_cell",false,2443096814698290185],[7667230146095136825,"cfg_if",false,7086512445608040552],[18408407127522236545,"getrandom",false,17875360125588881378]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ahash-083abbaa93f8d1d5/dep-lib-ahash","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
@@ -0,0 +1 @@
|
||||
d0fd139d2d6fe9fe
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"getrandom\", \"runtime-rng\", \"std\"]","declared_features":"[\"atomic-polyfill\", \"compile-time-rng\", \"const-random\", \"default\", \"getrandom\", \"nightly-arm-aes\", \"no-rng\", \"runtime-rng\", \"serde\", \"std\"]","target":17883862002600103897,"profile":2225463790103693989,"path":13700147300334155681,"deps":[[5398981501050481332,"version_check",false,9093130928904530924]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ahash-887b7da2d37d55d6/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
ebb0998ec39f6abc
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[966925859616469517,"build_script_build",false,18368334796906823120]],"local":[{"RerunIfChanged":{"output":"debug/build/ahash-dc1285a89ec75c59/output","paths":["build.rs"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
0cdadf6bbac2479e
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"default\", \"fresh-rust\", \"nightly\", \"serde\", \"std\"]","target":5388200169723499962,"profile":12994027242049262075,"path":16863868198614364878,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/allocator-api2-51e1a47505c97ada/dep-lib-allocator_api2","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
2ced9d73bc1254ae
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":5116616278641129243,"profile":2225463790103693989,"path":9079994346526914841,"deps":[[4289358735036141001,"proc_macro2",false,7808613977271444273],[10420560437213941093,"syn",false,18070580129826465430],[13111758008314797071,"quote",false,12834613863005459751]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-trait-dbb82fc2b51ca00f/dep-lib-async_trait","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
3cd7c475123cae5a
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":2515742790907851906,"profile":15657897354478470176,"path":7729273730818971309,"deps":[[5157631553186200874,"num_traits",false,14189336308541510816]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/atoi-50b2f77802c97f93/dep-lib-atoi","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
05477a0c18ac3095
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":2515742790907851906,"profile":15657897354478470176,"path":7729273730818971309,"deps":[[5157631553186200874,"num_traits",false,4996158584479193397]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/atoi-54f74b1bdca4e9db/dep-lib-atoi","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
0a079d4a2dfed174
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[\"portable-atomic\"]","target":14411119108718288063,"profile":15657897354478470176,"path":5467194715875109824,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/atomic-waker-60d48cad28c8a968/dep-lib-atomic_waker","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
@@ -0,0 +1 @@
|
||||
ae9c58b8c03e29bf
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":14121973668959188858,"profile":8731458305071235362,"path":4942398508502643691,"deps":[[1566171736144735121,"tokio",false,11970737314559965406],[2737927996754702673,"jsonwebtoken",false,781625164713557076],[3856126590694406759,"chrono",false,234779239872397994],[4891297352905791595,"axum",false,13546164574527791840],[4914321236340703631,"bcrypt",false,13734001016278350378],[5380358770761950913,"tracing_subscriber",false,13641569306491255327],[8008191657135824715,"thiserror",false,7903879468954246221],[8460377374586444205,"rand",false,8381857581297130868],[10632374999838431203,"sqlx",false,6033843150107664142],[13548984313718623784,"serde",false,4056990464904625309],[13795362694956882968,"serde_json",false,6356296470363172442],[14435908599267459652,"tower_http",false,12218804558470048821],[14757622794040968908,"tracing",false,1355749155226338707]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/attendance-d4afd4c033e98023/dep-bin-attendance","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"unused import: `axum::Router`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":58,"byte_end":70,"line_start":7,"line_end":7,"column_start":5,"column_end":17,"is_primary":true,"text":[{"text":"use axum::Router;","highlight_start":5,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":54,"byte_end":72,"line_start":7,"line_end":8,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use axum::Router;","highlight_start":1,"highlight_end":18},{"text":"use tracing_subscriber::EnvFilter;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `axum::Router`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:7:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m7\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use axum::Router;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default\n\n"}
|
||||
{"$message_type":"diagnostic","message":"enum `AppError` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/error.rs","byte_start":150,"byte_end":158,"line_start":6,"line_end":6,"column_start":10,"column_end":18,"is_primary":true,"text":[{"text":"pub enum AppError {","highlight_start":10,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: enum `AppError` is never used\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/error.rs:6:10\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m6\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub enum AppError {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,6 @@
|
||||
{"$message_type":"diagnostic","message":"unresolved import `tracing_subscriber::EnvFilter`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018 or later, paths in `use` statements are relative to the current\nmodule unless they begin with the name of a crate or a literal `crate::`, in\nwhich case they start from the crate root. As in Rust 2015 code, the `self::`\nand `super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nSince Rust 2018 the `extern crate` declaration is not required and\nyou can instead just `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":76,"byte_end":105,"line_start":8,"line_end":8,"column_start":5,"column_end":34,"is_primary":true,"text":[{"text":"use tracing_subscriber::EnvFilter;","highlight_start":5,"highlight_end":34}],"label":"no `EnvFilter` in the root","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"found an item that was configured out","code":null,"level":"note","spans":[{"file_name":"/home/mpuchstein/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-subscriber-0.3.23/src/lib.rs","byte_start":9288,"byte_end":9310,"line_start":238,"line_end":238,"column_start":12,"column_end":34,"is_primary":false,"text":[{"text":" #![all(feature = \"env-filter\", feature = \"std\")]","highlight_start":12,"highlight_end":34}],"label":"the item is gated behind the `env-filter` feature","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/home/mpuchstein/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-subscriber-0.3.23/src/lib.rs","byte_start":9350,"byte_end":9359,"line_start":239,"line_end":239,"column_start":21,"column_end":30,"is_primary":true,"text":[{"text":" pub use filter::EnvFilter;","highlight_start":21,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0432]\u001b[0m\u001b[1m: unresolved import `tracing_subscriber::EnvFilter`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:8:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m 8\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use tracing_subscriber::EnvFilter;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[91m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m \u001b[1m\u001b[91mno `EnvFilter` in the root\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[92mnote\u001b[0m: found an item that was configured out\n \u001b[1m\u001b[94m--> \u001b[0m/home/mpuchstein/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-subscriber-0.3.23/src/lib.rs:239:21\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m238\u001b[0m \u001b[1m\u001b[94m|\u001b[0m #![all(feature = \"env-filter\", feature = \"std\")]\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m----------------------\u001b[0m \u001b[1m\u001b[94mthe item is gated behind the `env-filter` feature\u001b[0m\n\u001b[1m\u001b[94m239\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub use filter::EnvFilter;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[92m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"unused import: `axum::Router`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":58,"byte_end":70,"line_start":7,"line_end":7,"column_start":5,"column_end":17,"is_primary":true,"text":[{"text":"use axum::Router;","highlight_start":5,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":54,"byte_end":72,"line_start":7,"line_end":8,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use axum::Router;","highlight_start":1,"highlight_end":18},{"text":"use tracing_subscriber::EnvFilter;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: unused import: `axum::Router`\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:7:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m7\u001b[0m \u001b[1m\u001b[94m|\u001b[0m use axum::Router;\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default\n\n"}
|
||||
{"$message_type":"diagnostic","message":"no method named `with_env_filter` found for struct `SubscriberBuilder<N, E, F, W>` in the current scope","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":145,"byte_end":180,"line_start":12,"line_end":13,"column_start":5,"column_end":10,"is_primary":false,"text":[{"text":" tracing_subscriber::fmt()","highlight_start":5,"highlight_end":30},{"text":" .with_env_filter(EnvFilter::from_default_env())","highlight_start":1,"highlight_end":10}],"label":"","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":180,"byte_end":195,"line_start":13,"line_end":13,"column_start":10,"column_end":25,"is_primary":true,"text":[{"text":" .with_env_filter(EnvFilter::from_default_env())","highlight_start":10,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"there is a method `with_file` with a similar name","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":180,"byte_end":195,"line_start":13,"line_end":13,"column_start":10,"column_end":25,"is_primary":true,"text":[{"text":" .with_env_filter(EnvFilter::from_default_env())","highlight_start":10,"highlight_end":25}],"label":null,"suggested_replacement":"with_file","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[91merror[E0599]\u001b[0m\u001b[1m: no method named `with_env_filter` found for struct `SubscriberBuilder<N, E, F, W>` in the current scope\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/main.rs:13:10\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m12\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m/\u001b[0m tracing_subscriber::fmt()\n\u001b[1m\u001b[94m13\u001b[0m \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|\u001b[0m .with_env_filter(EnvFilter::from_default_env())\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m|_________-\u001b[0m\u001b[1m\u001b[91m^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[96mhelp\u001b[0m: there is a method `with_file` with a similar name\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m13\u001b[0m \u001b[91m- \u001b[0m .\u001b[91mwith_env_filter\u001b[0m(EnvFilter::from_default_env())\n\u001b[1m\u001b[94m13\u001b[0m \u001b[92m+ \u001b[0m .\u001b[92mwith_file\u001b[0m(EnvFilter::from_default_env())\n \u001b[1m\u001b[94m|\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"aborting due to 2 previous errors; 1 warning emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[1m\u001b[91merror\u001b[0m\u001b[1m: aborting due to 2 previous errors; 1 warning emitted\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0432, E0599.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mSome errors have detailed explanations: E0432, E0599.\u001b[0m\n"}
|
||||
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0432`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[1mFor more information about an error, try `rustc --explain E0432`.\u001b[0m\n"}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
c92f2b6bc618736e
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":6962977057026645649,"profile":2225463790103693989,"path":9175036203909387601,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/autocfg-f1d5f364d2c6b38e/dep-lib-autocfg","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
bec16f8b93429fb7
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"tracing\"]","declared_features":"[\"__private_docs\", \"tracing\"]","target":2565713999752801252,"profile":15657897354478470176,"path":17989969299998953211,"deps":[[784494742817713399,"tower_service",false,13494208714859477474],[2251399859588827949,"pin_project_lite",false,11419911017601529567],[2517136641825875337,"sync_wrapper",false,2430679976991628594],[2620434475832828286,"http",false,6714311497922712961],[3870702314125662939,"bytes",false,8160273449657478726],[5898568623609459682,"futures_util",false,9027203722678571210],[7712452662827335977,"tower_layer",false,15395102810455740482],[10229185211513642314,"mime",false,2699991194930866433],[14084095096285906100,"http_body",false,4779550800206610445],[14156967978702956262,"rustversion",false,3820415621785287341],[14757622794040968908,"tracing",false,1355749155226338707],[16611674984963787466,"async_trait",false,12561685861246037292],[16900715236047033623,"http_body_util",false,5686204871559550094]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-core-3fb86983b5231d70/dep-lib-axum_core","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
e0a2b5ede8a4fdbb
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"form\", \"http1\", \"json\", \"macros\", \"matched-path\", \"original-uri\", \"query\", \"tokio\", \"tower-log\", \"tracing\"]","declared_features":"[\"__private_docs\", \"default\", \"form\", \"http1\", \"http2\", \"json\", \"macros\", \"matched-path\", \"multipart\", \"original-uri\", \"query\", \"tokio\", \"tower-log\", \"tracing\", \"ws\"]","target":13920321295547257648,"profile":15657897354478470176,"path":4096657217416688954,"deps":[[784494742817713399,"tower_service",false,13494208714859477474],[1363051979936526615,"memchr",false,6646663411507204065],[1566171736144735121,"tokio",false,11970737314559965406],[2251399859588827949,"pin_project_lite",false,11419911017601529567],[2517136641825875337,"sync_wrapper",false,2430679976991628594],[2620434475832828286,"http",false,6714311497922712961],[3626672138398771397,"hyper",false,14996867152490753156],[3632162862999675140,"tower",false,1884440716174221206],[3870702314125662939,"bytes",false,8160273449657478726],[4359148418957042248,"axum_core",false,13231367431704789438],[5532778797167691009,"itoa",false,1062210784640231879],[5898568623609459682,"futures_util",false,9027203722678571210],[6803352382179706244,"percent_encoding",false,11605965357053572464],[7712452662827335977,"tower_layer",false,15395102810455740482],[7940089053034940860,"axum_macros",false,4694538953625853049],[9678799920983747518,"matchit",false,1990737356370484275],[10229185211513642314,"mime",false,2699991194930866433],[11976082518617474977,"hyper_util",false,5068821436219629532],[13548984313718623784,"serde",false,4056990464904625309],[13795362694956882968,"serde_json",false,6356296470363172442],[14084095096285906100,"http_body",false,4779550800206610445],[14156967978702956262,"rustversion",false,3820415621785287341],[14757622794040968908,"tracing",false,1355749155226338707],[14814583949208169760,"serde_path_to_error",false,18161345939420712134],[16542808166767769916,"serde_urlencoded",false,6625916182882735772],[16611674984963787466,"async_trait",false,12561685861246037292],[16900715236047033623,"http_body_util",false,5686204871559550094]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-d36e9448180363d7/dep-lib-axum","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
795c1a3b4e5a2641
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\"]","declared_features":"[\"__private\", \"default\"]","target":7759748055708476646,"profile":2225463790103693989,"path":14069680205781209845,"deps":[[4289358735036141001,"proc_macro2",false,7808613977271444273],[10420560437213941093,"syn",false,18070580129826465430],[13111758008314797071,"quote",false,12834613863005459751]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-macros-78a5a79f7a8186b5/dep-lib-axum_macros","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
2e011bf7b4a8d6e8
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"std\"]","target":13060062996227388079,"profile":15657897354478470176,"path":14268551781074171493,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/base64-5ec41e4236db44dc/dep-lib-base64","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
2afa1f9028f998be
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"getrandom\", \"std\", \"zeroize\"]","declared_features":"[\"alloc\", \"default\", \"getrandom\", \"js\", \"std\", \"zeroize\"]","target":15699326785376903934,"profile":15657897354478470176,"path":7982305825776651848,"deps":[[11023519408959114924,"getrandom",false,2464845093962588934],[12865141776541797048,"zeroize",false,13330841684456218223],[13077212702700853852,"base64",false,16777782957008683310],[14723042243959528973,"blowfish",false,14618100003854152446],[17003143334332120809,"subtle",false,9856079139890328339]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bcrypt-53810fed611d9525/dep-lib-bcrypt","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
596da193a9f5a3eb
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[\"arbitrary\", \"bytemuck\", \"example_generated\", \"serde\", \"serde_core\", \"std\"]","target":7691312148208718491,"profile":15657897354478470176,"path":14976424799547392278,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bitflags-2a04fbba39d3b3c3/dep-lib-bitflags","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
f68f4e342947d96b
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"std\"]","declared_features":"[\"arbitrary\", \"bytemuck\", \"example_generated\", \"serde\", \"serde_core\", \"std\"]","target":7691312148208718491,"profile":2225463790103693989,"path":14976424799547392278,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bitflags-bc5edfaec938e53b/dep-lib-bitflags","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
5d63521ab0c1ca18
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":4098124618827574291,"profile":15657897354478470176,"path":14502745951513426790,"deps":[[10520923840501062997,"generic_array",false,13886427191192511947]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/block-buffer-f9be68bdcec29318/dep-lib-block_buffer","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
fef2dce480ecddca
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"bcrypt\"]","declared_features":"[\"bcrypt\", \"zeroize\"]","target":2484384566325761644,"profile":15657897354478470176,"path":13872077442756917457,"deps":[[3712811570531045576,"byteorder",false,140677669417516667],[7916416211798676886,"cipher",false,13693560843416981333]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/blowfish-bedb655be23e4b29/dep-lib-blowfish","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
7bfe755198c9f301
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"std\"]","declared_features":"[\"default\", \"i128\", \"std\"]","target":8344828840634961491,"profile":15657897354478470176,"path":12529188284904491116,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/byteorder-f0ec718cc8a0597f/dep-lib-byteorder","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
46aee2ac771d3f71
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"extra-platforms\", \"serde\", \"std\"]","target":11402411492164584411,"profile":5585765287293540646,"path":867761994313798194,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bytes-7700b1df813bc0a9/dep-lib-bytes","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
BIN
backend/target/debug/.fingerprint/cc-b8b54aca4cf132dd/dep-lib-cc
Normal file
BIN
backend/target/debug/.fingerprint/cc-b8b54aca4cf132dd/dep-lib-cc
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
8e3231bf308079f9
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":18276270781310494267,"features":"[]","declared_features":"[\"jobserver\", \"parallel\"]","target":11042037588551934598,"profile":4333757155065362140,"path":15212911666299670158,"deps":[[8410525223747752176,"shlex",false,15932180731663831049],[9159843920629750842,"find_msvc_tools",false,18040573332540159009]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cc-b8b54aca4cf132dd/dep-lib-cc","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user