fix: default to tokio current_thread flavor & system allocator
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user