Skip to content

Commit 7bf9c4e

Browse files
authored
Merge pull request #34 from NikkeTryHard/feat/pytest-asyncio-support
feat: implement pytest-asyncio support (0.2.2)
2 parents 4fb11c1 + 6dd01f0 commit 7bf9c4e

30 files changed

+1197
-467
lines changed

.cargo/config.toml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
# Cargo configuration for memory-constrained systems (7.7GB RAM)
2-
# Prevents OOM crashes during PyO3 compilation and testing
1+
# Speed-optimized Cargo config
2+
# Uses mold linker + sccache for fast builds
33

44
[build]
5-
# Limit to 1 parallel compilation job to minimize memory spikes
6-
# PyO3 + tokio + pyo3-macros can use 2-3GB per job
7-
jobs = 1
5+
# Use sccache for compilation caching
6+
rustc-wrapper = "sccache"
7+
# Parallel jobs (adjust based on RAM)
8+
jobs = 4
9+
10+
[target.x86_64-unknown-linux-gnu]
11+
# Use mold linker (10x faster than default ld)
12+
linker = "clang"
13+
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
814

915
[env]
10-
# Reduce codegen units for lower memory usage during linking
11-
CARGO_PROFILE_DEV_CODEGEN_UNITS = "1"
12-
# Limit test parallelism to prevent resource exhaustion on WSL2
13-
# Tests create kernel resources (userfaultfd, memfd, mmap, sockets, threads)
14-
# that can overwhelm WSL2 when run concurrently
15-
RUST_TEST_THREADS = "1"
16+
# Parallel test threads
17+
RUST_TEST_THREADS = "4"
18+
19+
[profile.dev]
20+
incremental = true
21+
codegen-units = 16
1622

17-
# Optimize test profile for lower memory usage
1823
[profile.test]
19-
# Fewer codegen units = less memory during compilation
20-
codegen-units = 1
21-
# No LTO in tests (LTO uses massive memory)
22-
lto = false
23-
# Keep some debug info but not full
24+
incremental = true
25+
codegen-units = 16
26+
opt-level = 0
2427
debug = 1
25-
# Optimize slightly to reduce binary size
26-
opt-level = 1
28+
lto = false
29+
30+
[profile.release]
31+
lto = "thin"
32+
codegen-units = 1

.config/nextest.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Nextest configuration for fast parallel testing
2+
3+
[profile.default]
4+
# Run tests in parallel
5+
test-threads = "num-cpus"
6+
# Fail fast on first failure
7+
fail-fast = true
8+
# Retry flaky tests once
9+
retries = 1
10+
# Timeout per test
11+
slow-timeout = { period = "60s", terminate-after = 2 }
12+
13+
[profile.ci]
14+
# CI-specific settings
15+
test-threads = 4
16+
fail-fast = false
17+
retries = 0

0 commit comments

Comments
 (0)