Compare commits
121 Commits
v1.0.0
...
edition202
Author | SHA1 | Date | |
---|---|---|---|
d59949a8c1
|
|||
73e11d5596
|
|||
778b245d56
|
|||
fbf1c5b9d3
|
|||
442cb9b825
|
|||
83e64db434
|
|||
4ccc9ddaac
|
|||
4b71a46a5b
|
|||
34e0bcc75e
|
|||
3bb8e14a96
|
|||
00711117ac
|
|||
bab112e01c
|
|||
e8617a9254
|
|||
cde936d915
|
|||
c11a7e8420
|
|||
a76eff9936
|
|||
38f679ed07
|
|||
2b038ccb12
|
|||
544f44b4d9
|
|||
099bed55da
|
|||
80ba8ff09c
|
|||
fb2595f5a3
|
|||
f848fd7cd3
|
|||
cf2d26f772
|
|||
7a371e9933
|
|||
794af78718
|
|||
459d96daf4
|
|||
370e0a1401
|
|||
3c2c357f17
|
|||
d7a9f54769
|
|||
3a6bdb46e4
|
|||
018e782f1e
|
|||
0613110921
|
|||
b1e0b61f97
|
|||
ff7650aabd
|
|||
5ab16f4fe7
|
|||
e396102892
|
|||
1312c22faa
|
|||
696efb99b4
|
|||
dc65d84d3f
|
|||
7aaa82db83
|
|||
7a915f74eb
|
|||
6fdf49078a
|
|||
e6346c2d3f
|
|||
338981fac7
|
|||
463a7c7c4a
|
|||
af42a51e54
|
|||
4ef1350990
|
|||
9d33303ced
|
|||
7bd6d6fcfe
|
|||
3e1471db00
|
|||
0c36b6298d
|
|||
e3810a74bc
|
|||
03f260b344
|
|||
566ddc8a0f
|
|||
90b5e93ab8
|
|||
b9e7bba84a
|
|||
ab01464d49
|
|||
31638d1662
|
|||
dba65414d3
|
|||
20c359ff2a
|
|||
481483382e
|
|||
e75d6258ce
|
|||
746f291089
|
|||
6238bde638
|
|||
1303f5016d
|
|||
4eb0124f07
|
|||
0807b46334
|
|||
20fcc46205
|
|||
c051dcaf86
|
|||
3ada28e0ed
|
|||
3ea6086537
|
|||
e7496f0e80
|
|||
048a3aceb0
|
|||
2f894d1412
|
|||
502c05e22a
|
|||
c69539e29b
|
|||
38aadda428
|
|||
7f9ea04519
|
|||
84a79f4d74
|
|||
137602a192
|
|||
a45e93f4da
|
|||
0d6d945920
|
|||
b50cd2a565
|
|||
0f979a5e30
|
|||
3ef57bd500
|
|||
d289c376fd
|
|||
3f5a42981b
|
|||
d229366d20
|
|||
0951b6e863
|
|||
23f3b63b0d
|
|||
faaa7fc3b7
|
|||
eb4aa2e332
|
|||
5de818a095
|
|||
63f8216f33
|
|||
bc579551a0
|
|||
d211499fe5
|
|||
f4f427ab83
|
|||
82cf70f544
|
|||
5cb2e216d9
|
|||
43209a4925
|
|||
4114b388ca
|
|||
2de132b835
|
|||
03d636fecc
|
|||
390a6bddfd
|
|||
00e3817677
|
|||
2841c69e71
|
|||
02998ba067
|
|||
7f54021e3e
|
|||
f318948b94
|
|||
49a82d90f4
|
|||
5c3f67b7b0
|
|||
8a8d418d5c
|
|||
268032a86e
|
|||
2ef2865614
|
|||
1b69509f8c
|
|||
3d8def56a3
|
|||
a4fa0d7ee3
|
|||
974d0ed72c
|
|||
7f749e6c6d
|
|||
c92734913a
|
941
Cargo.lock
generated
941
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
15
Cargo.toml
15
Cargo.toml
@ -1,10 +1,19 @@
|
||||
[package]
|
||||
name = "expose-dir-via-http"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
version = "1.1.13"
|
||||
edition = "2024"
|
||||
rust-version = "1.85"
|
||||
|
||||
[lints.rust]
|
||||
unsafe_code = "forbid"
|
||||
|
||||
[lints.clippy]
|
||||
pedantic = { level = "warn", priority = -1 }
|
||||
todo = "warn"
|
||||
unwrap_used = "warn"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { version = "4", features = ["experimental-io-uring"] }
|
||||
actix-web = { version = "4" }
|
||||
actix-files = "0.6"
|
||||
clap = { version = "4", features = ["cargo", "derive"] }
|
||||
|
||||
|
2
rust-toolchain.toml
Normal file
2
rust-toolchain.toml
Normal file
@ -0,0 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "nightly"
|
@ -1,11 +1,11 @@
|
||||
use std::{
|
||||
env,
|
||||
net::{IpAddr, SocketAddr},
|
||||
num::NonZeroUsize,
|
||||
thread::available_parallelism,
|
||||
};
|
||||
|
||||
use actix_web::{App, HttpServer};
|
||||
use clap::{crate_name, crate_version, Parser};
|
||||
use clap::{Parser, crate_name, crate_version};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[clap(name = crate_name!(), version = crate_version!())]
|
||||
@ -39,7 +39,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.prefer_utf8(true),
|
||||
)
|
||||
})
|
||||
.workers(available_parallelism().unwrap().get())
|
||||
.workers(available_parallelism().map_or(1, NonZeroUsize::get))
|
||||
.bind(sock)?
|
||||
.run()
|
||||
.await
|
||||
|
Reference in New Issue
Block a user