fix: default to tokio current_thread flavor & system allocator

This commit is contained in:
monosans
2025-09-30 15:01:28 +03:00
parent d3f64742df
commit f9513a3828
4 changed files with 9 additions and 4 deletions
+2 -2
View File
@@ -246,9 +246,9 @@ jobs:
env:
RUSTFLAGS: ""
- if: ${{ matrix.cross }}
run: cross +beta build --features mimalloc_v3,tui --release --target '${{ matrix.target }}' --locked
run: cross +beta build --features tokio-current-thread,tui --release --target '${{ matrix.target }}' --locked
- if: ${{ !matrix.cross }}
run: cargo +beta build --features mimalloc_v3,tui --release --target '${{ matrix.target }}' --locked
run: cargo +beta build --features tokio-current-thread,tui --release --target '${{ matrix.target }}' --locked
- run: mkdir dist
- run: echo -n '${{ github.sha }}' > dist/commit-sha.txt
shell: bash
+1
View File
@@ -66,6 +66,7 @@ dhat = ["dep:dhat"]
jemalloc = ["dep:tikv-jemallocator"]
mimalloc_v2 = ["dep:mimalloc_v2"]
mimalloc_v3 = ["dep:mimalloc_v3"]
tokio-current-thread = []
tui = ["dep:crossterm", "dep:futures", "dep:ratatui", "dep:tui-logger"]
[profile.release]
+1 -1
View File
@@ -9,7 +9,7 @@ RUN --mount=source=src,target=src \
--mount=source=Cargo.lock,target=Cargo.lock \
--mount=type=cache,target=/app/target,sharing=locked \
--mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
cargo build --features mimalloc_v3 --release --locked \
cargo build --features tokio-current-thread --release --locked \
&& cp target/release/proxy-scraper-checker .
+5 -1
View File
@@ -318,7 +318,11 @@ async fn run_without_tui(
main_task(config, token).await
}
#[tokio::main]
#[cfg_attr(
feature = "tokio-current-thread",
tokio::main(flavor = "current_thread")
)]
#[cfg_attr(not(feature = "tokio-current-thread"), tokio::main)]
#[expect(clippy::unwrap_in_result)]
async fn main() -> crate::Result<()> {
#[cfg(feature = "dhat")]