turboapi 0.4.16__tar.gz → 0.5.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. {turboapi-0.4.16 → turboapi-0.5.21}/.github/workflows/build-and-release.yml +26 -8
  2. {turboapi-0.4.16 → turboapi-0.5.21}/.gitignore +12 -4
  3. {turboapi-0.4.16 → turboapi-0.5.21}/CHANGELOG.md +50 -0
  4. {turboapi-0.4.16 → turboapi-0.5.21}/Cargo.lock +205 -1
  5. {turboapi-0.4.16 → turboapi-0.5.21}/Cargo.toml +13 -2
  6. turboapi-0.5.21/Makefile +53 -0
  7. {turboapi-0.4.16 → turboapi-0.5.21}/PKG-INFO +180 -69
  8. {turboapi-0.4.16 → turboapi-0.5.21}/README.md +174 -63
  9. turboapi-0.5.21/benches/async_comparison_bench.py +325 -0
  10. turboapi-0.5.21/benches/performance_bench.rs +564 -0
  11. turboapi-0.5.21/benches/python_benchmark.py +384 -0
  12. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/run_all.sh +0 -0
  13. turboapi-0.5.21/docs/ARCHITECTURE.md +205 -0
  14. turboapi-0.5.21/docs/ASYNC_HANDLERS.md +125 -0
  15. turboapi-0.5.21/docs/BENCHMARKS.md +158 -0
  16. turboapi-0.5.21/docs/HTTP2.md +154 -0
  17. turboapi-0.5.21/docs/PERFORMANCE_TUNING.md +189 -0
  18. turboapi-0.5.21/docs/README.md +38 -0
  19. turboapi-0.5.21/docs/TLS_SETUP.md +165 -0
  20. turboapi-0.5.21/docs/WEBSOCKET.md +206 -0
  21. {turboapi-0.4.16 → turboapi-0.5.21}/pyproject.toml +2 -2
  22. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/request_handler.py +23 -6
  23. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/rust_integration.py +37 -11
  24. {turboapi-0.4.16 → turboapi-0.5.21}/src/http2.rs +170 -6
  25. {turboapi-0.4.16 → turboapi-0.5.21}/src/lib.rs +2 -0
  26. {turboapi-0.4.16 → turboapi-0.5.21}/src/server.rs +551 -978
  27. {turboapi-0.4.16 → turboapi-0.5.21}/src/simd_json.rs +48 -32
  28. {turboapi-0.4.16 → turboapi-0.5.21}/src/simd_parse.rs +27 -12
  29. turboapi-0.5.21/src/tls.rs +190 -0
  30. {turboapi-0.4.16 → turboapi-0.5.21}/src/websocket.rs +73 -14
  31. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_async_handlers.py +0 -0
  32. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_async_simple.py +0 -0
  33. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_comprehensive_v0_4_15.py +0 -0
  34. turboapi-0.5.21/tests/test_issue_fixes.py +508 -0
  35. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_performance_regression.py +0 -0
  36. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_post_body_parsing.py +0 -0
  37. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_query_and_headers.py +0 -0
  38. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_request_parsing.py +0 -0
  39. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_satya_0_4_0_compatibility.py +10 -10
  40. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_wrk_regression.py +0 -0
  41. turboapi-0.5.21/uv.lock +667 -0
  42. turboapi-0.4.16/AGENTS.md +0 -320
  43. turboapi-0.4.16/ASYNC_FIX_v0_4_15.md +0 -342
  44. turboapi-0.4.16/BENCHMARK_FAQ.md +0 -204
  45. turboapi-0.4.16/BENCHMARK_METHODOLOGY_RESPONSE.md +0 -340
  46. turboapi-0.4.16/BENCHMARK_ONEPAGER.md +0 -140
  47. turboapi-0.4.16/FASTAPI_COMPATIBILITY.md +0 -606
  48. turboapi-0.4.16/Makefile +0 -71
  49. turboapi-0.4.16/PHASE_3_COMPLETE.md +0 -489
  50. turboapi-0.4.16/POST_BODY_PARSING_FIX.md +0 -167
  51. turboapi-0.4.16/QUICK_RESPONSE_MULTICORE.md +0 -252
  52. turboapi-0.4.16/RELEASE_NOTES_v0.4.13.md +0 -362
  53. turboapi-0.4.16/RELEASE_NOTES_v0.4.14.md +0 -412
  54. turboapi-0.4.16/RESPONSE_SUMMARY.md +0 -274
  55. turboapi-0.4.16/TESTING.md +0 -205
  56. turboapi-0.4.16/TODO_v0.4.15.md +0 -195
  57. turboapi-0.4.16/V0.4.13_SUMMARY.md +0 -265
  58. turboapi-0.4.16/V0.4.14_SUMMARY.md +0 -312
  59. turboapi-0.4.16/V0.4.15_SUMMARY.md +0 -418
  60. turboapi-0.4.16/benches/performance_bench.rs +0 -184
  61. turboapi-0.4.16/benchmark_comparison.png +0 -0
  62. turboapi-0.4.16/benchmark_graphs/turbo_vs_fastapi_performance_20250929_025531.png +0 -0
  63. turboapi-0.4.16/docs/ARCHITECTURE_DIAGRAM.md +0 -382
  64. turboapi-0.4.16/docs/AUTHENTICATION_GUIDE.md +0 -797
  65. turboapi-0.4.16/setup_python313t.sh +0 -97
  66. turboapi-0.4.16/test_package_integrity.py +0 -339
  67. turboapi-0.4.16/test_simple_post.py +0 -28
  68. turboapi-0.4.16/turbo_vs_fastapi_benchmark_20250929_025526.json +0 -60
  69. {turboapi-0.4.16 → turboapi-0.5.21}/.github/scripts/check_performance_regression.py +0 -0
  70. {turboapi-0.4.16 → turboapi-0.5.21}/.github/scripts/compare_benchmarks.py +0 -0
  71. {turboapi-0.4.16 → turboapi-0.5.21}/.github/workflows/README.md +0 -0
  72. {turboapi-0.4.16 → turboapi-0.5.21}/.github/workflows/benchmark.yml +0 -0
  73. {turboapi-0.4.16 → turboapi-0.5.21}/.github/workflows/ci.yml +0 -0
  74. {turboapi-0.4.16 → turboapi-0.5.21}/.github/workflows/release.yml +0 -0
  75. {turboapi-0.4.16 → turboapi-0.5.21}/LICENSE +0 -0
  76. {turboapi-0.4.16 → turboapi-0.5.21}/assets/architecture.png +0 -0
  77. {turboapi-0.4.16 → turboapi-0.5.21}/assets/benchmark_latency.png +0 -0
  78. {turboapi-0.4.16 → turboapi-0.5.21}/assets/benchmark_speedup.png +0 -0
  79. {turboapi-0.4.16 → turboapi-0.5.21}/assets/benchmark_throughput.png +0 -0
  80. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/README.md +0 -0
  81. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/bench_json.py +0 -0
  82. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/bench_memory.py +0 -0
  83. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/bench_throughput.py +0 -0
  84. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/bench_validation.py +0 -0
  85. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/generate_charts.py +0 -0
  86. {turboapi-0.4.16 → turboapi-0.5.21}/benchmarks/run_benchmarks.py +0 -0
  87. {turboapi-0.4.16 → turboapi-0.5.21}/examples/authentication_demo.py +0 -0
  88. {turboapi-0.4.16 → turboapi-0.5.21}/examples/multi_route_app.py +0 -0
  89. {turboapi-0.4.16 → turboapi-0.5.21}/python/MANIFEST.in +0 -0
  90. {turboapi-0.4.16 → turboapi-0.5.21}/python/setup.py +0 -0
  91. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/__init__.py +0 -0
  92. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/async_limiter.py +0 -0
  93. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/async_pool.py +0 -0
  94. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/background.py +0 -0
  95. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/datastructures.py +0 -0
  96. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/decorators.py +0 -0
  97. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/encoders.py +0 -0
  98. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/exceptions.py +0 -0
  99. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/main_app.py +0 -0
  100. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/middleware.py +0 -0
  101. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/models.py +0 -0
  102. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/openapi.py +0 -0
  103. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/responses.py +0 -0
  104. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/routing.py +0 -0
  105. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/security.py +0 -0
  106. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/server_integration.py +0 -0
  107. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/staticfiles.py +0 -0
  108. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/status.py +0 -0
  109. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/templating.py +0 -0
  110. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/testclient.py +0 -0
  111. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/version_check.py +0 -0
  112. {turboapi-0.4.16 → turboapi-0.5.21}/python/turboapi/websockets.py +0 -0
  113. {turboapi-0.4.16 → turboapi-0.5.21}/src/micro_bench.rs +0 -0
  114. {turboapi-0.4.16 → turboapi-0.5.21}/src/middleware.rs +0 -0
  115. {turboapi-0.4.16 → turboapi-0.5.21}/src/python_worker.rs +0 -0
  116. {turboapi-0.4.16 → turboapi-0.5.21}/src/request.rs +0 -0
  117. {turboapi-0.4.16 → turboapi-0.5.21}/src/response.rs +0 -0
  118. {turboapi-0.4.16 → turboapi-0.5.21}/src/router.rs +0 -0
  119. {turboapi-0.4.16 → turboapi-0.5.21}/src/threadpool.rs +0 -0
  120. {turboapi-0.4.16 → turboapi-0.5.21}/src/validation.rs +0 -0
  121. {turboapi-0.4.16 → turboapi-0.5.21}/src/zerocopy.rs +0 -0
  122. {turboapi-0.4.16 → turboapi-0.5.21}/tests/README.md +0 -0
  123. {turboapi-0.4.16 → turboapi-0.5.21}/tests/benchmark_comparison.py +0 -0
  124. {turboapi-0.4.16 → turboapi-0.5.21}/tests/comparison_before_after.py +0 -0
  125. {turboapi-0.4.16 → turboapi-0.5.21}/tests/fastapi_equivalent.py +0 -0
  126. {turboapi-0.4.16 → turboapi-0.5.21}/tests/quick_body_test.py +0 -0
  127. {turboapi-0.4.16 → turboapi-0.5.21}/tests/quick_test.py +0 -0
  128. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test.py +0 -0
  129. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_comprehensive_parity.py +0 -0
  130. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_fastapi_compatibility.py +0 -0
  131. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_fastapi_parity.py +0 -0
  132. {turboapi-0.4.16 → turboapi-0.5.21}/tests/test_security_features.py +0 -0
  133. {turboapi-0.4.16 → turboapi-0.5.21}/tests/wrk_benchmark.py +0 -0
  134. {turboapi-0.4.16 → turboapi-0.5.21}/tests/wrk_comparison.py +0 -0
@@ -38,14 +38,10 @@ jobs:
38
38
  echo "Version $VERSION already on PyPI, skipping"
39
39
  fi
40
40
 
41
- linux:
41
+ linux-x86_64:
42
42
  runs-on: ubuntu-latest
43
43
  needs: [check-version]
44
44
  if: needs.check-version.outputs.should_publish == 'true'
45
- strategy:
46
- matrix:
47
- target: [x86_64, aarch64]
48
- fail-fast: false
49
45
  steps:
50
46
  - uses: actions/checkout@v4
51
47
  - uses: actions/setup-python@v5
@@ -55,13 +51,35 @@ jobs:
55
51
  - name: Build wheels
56
52
  uses: PyO3/maturin-action@v1
57
53
  with:
58
- target: ${{ matrix.target }}
54
+ target: x86_64
55
+ args: --release --out dist --find-interpreter
56
+ sccache: 'true'
57
+ manylinux: auto
58
+ - uses: actions/upload-artifact@v4
59
+ with:
60
+ name: wheels-linux-x86_64
61
+ path: dist
62
+
63
+ linux-aarch64:
64
+ runs-on: ubuntu-24.04-arm
65
+ needs: [check-version]
66
+ if: needs.check-version.outputs.should_publish == 'true'
67
+ steps:
68
+ - uses: actions/checkout@v4
69
+ - uses: actions/setup-python@v5
70
+ with:
71
+ python-version: |
72
+ 3.13
73
+ - name: Build wheels
74
+ uses: PyO3/maturin-action@v1
75
+ with:
76
+ target: aarch64
59
77
  args: --release --out dist --find-interpreter
60
78
  sccache: 'true'
61
79
  manylinux: auto
62
80
  - uses: actions/upload-artifact@v4
63
81
  with:
64
- name: wheels-linux-${{ matrix.target }}
82
+ name: wheels-linux-aarch64
65
83
  path: dist
66
84
 
67
85
  windows:
@@ -132,7 +150,7 @@ jobs:
132
150
  publish:
133
151
  name: Publish to PyPI
134
152
  runs-on: ubuntu-latest
135
- needs: [linux, windows, macos, sdist]
153
+ needs: [linux-x86_64, linux-aarch64, windows, macos, sdist]
136
154
  steps:
137
155
  - uses: actions/download-artifact@v4
138
156
  with:
@@ -1,6 +1,8 @@
1
1
  # Rust build artifacts
2
2
  target/
3
- Cargo.lock
3
+
4
+ # Conductor workspace
5
+ .context/
4
6
 
5
7
  # Python artifacts
6
8
  __pycache__/
@@ -11,6 +13,8 @@ __pycache__/
11
13
  build/
12
14
  dist/
13
15
  .eggs/
16
+ *.egg
17
+ pip-wheel-metadata/
14
18
 
15
19
  # Virtual environments
16
20
  .env
@@ -27,24 +31,28 @@ turbo-freethreaded/
27
31
  .idea/
28
32
  *.swp
29
33
  *.swo
34
+ *~
30
35
 
31
36
  # macOS
32
37
  .DS_Store
38
+ .AppleDouble
39
+ .LSOverride
33
40
 
34
41
  # Benchmark and test outputs
35
42
  benchmark_graphs/
36
- *.json
37
43
  archive/
44
+ *.bench.json
45
+ benchmark_results*.json
38
46
 
39
47
  # Temporary files
40
48
  *.tmp
41
49
  *.temp
42
50
  *.log
51
+ *.bak
43
52
 
44
53
  # Documentation build
45
54
  docs/_build/
55
+ site/
46
56
 
47
57
  # PyO3/maturin build artifacts
48
58
  *.whl
49
- target/wheels/
50
- benchmark_graphs/
@@ -5,6 +5,56 @@ All notable changes to TurboAPI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0] - Unreleased
9
+
10
+ ### Added
11
+
12
+ - **Async Handler Fast Paths** - True async support via Tokio runtime
13
+ - `SimpleAsyncFast` handler type for GET async handlers
14
+ - `BodyAsyncFast` handler type for POST/PUT async handlers
15
+ - `add_route_async_fast()` method for async handler registration
16
+ - pyo3-async-runtimes integration for Python coroutine conversion
17
+ - Automatic handler classification for sync vs async detection
18
+
19
+ - **HTTP/2 Support** - Full HTTP/2 implementation
20
+ - `Http2Server` class with h2 protocol support
21
+ - Server push capabilities via `ServerPush`
22
+ - Stream multiplexing for concurrent requests
23
+
24
+ - **TLS Support** - Secure HTTPS connections
25
+ - rustls backend (default, pure Rust)
26
+ - Optional OpenSSL backend via feature flag
27
+ - PEM certificate and key loading
28
+
29
+ - **WebSocket Improvements** - Better message handling
30
+ - Improved text message routing to Python handlers
31
+ - Binary message handler support
32
+ - Clean connection lifecycle management
33
+
34
+ - **Comprehensive Benchmarks** - Performance testing suite
35
+ - `python_benchmark.py` - Full framework benchmarks
36
+ - `async_comparison_bench.py` - Sync vs async comparison
37
+ - `performance_bench.rs` - Low-level Rust benchmarks
38
+
39
+ - **Documentation**
40
+ - `docs/ASYNC_HANDLERS.md` - Async handler guide
41
+ - `docs/BENCHMARKS.md` - Benchmarking guide
42
+ - `docs/ARCHITECTURE.md` - Internal architecture
43
+ - DeepWiki integration for documentation
44
+
45
+ ### Changed
46
+
47
+ - Handler classification now detects coroutine functions
48
+ - Async handlers route through Tokio instead of Enhanced path
49
+ - Simplified TokioRuntime (removed loop sharding complexity)
50
+
51
+ ### Performance
52
+
53
+ - Async handlers use Tokio work-stealing scheduler
54
+ - Sequential latency: 1.3-1.4x faster than FastAPI
55
+ - Concurrent latency: 1.2-1.8x faster than FastAPI
56
+ - JSON endpoints show largest improvement (1.8x concurrent)
57
+
8
58
  ## [0.3.0] - 2025-09-30
9
59
 
10
60
  ### Fixed
@@ -156,6 +156,16 @@ version = "0.3.0"
156
156
  source = "registry+https://github.com/rust-lang/crates.io-index"
157
157
  checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
158
158
 
159
+ [[package]]
160
+ name = "cc"
161
+ version = "1.2.54"
162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
163
+ checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583"
164
+ dependencies = [
165
+ "find-msvc-tools",
166
+ "shlex",
167
+ ]
168
+
159
169
  [[package]]
160
170
  name = "cfg-if"
161
171
  version = "1.0.3"
@@ -375,6 +385,12 @@ version = "1.0.2"
375
385
  source = "registry+https://github.com/rust-lang/crates.io-index"
376
386
  checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
377
387
 
388
+ [[package]]
389
+ name = "find-msvc-tools"
390
+ version = "0.1.8"
391
+ source = "registry+https://github.com/rust-lang/crates.io-index"
392
+ checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
393
+
378
394
  [[package]]
379
395
  name = "float-cmp"
380
396
  version = "0.10.0"
@@ -390,6 +406,21 @@ version = "1.0.7"
390
406
  source = "registry+https://github.com/rust-lang/crates.io-index"
391
407
  checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
392
408
 
409
+ [[package]]
410
+ name = "foreign-types"
411
+ version = "0.3.2"
412
+ source = "registry+https://github.com/rust-lang/crates.io-index"
413
+ checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
414
+ dependencies = [
415
+ "foreign-types-shared",
416
+ ]
417
+
418
+ [[package]]
419
+ name = "foreign-types-shared"
420
+ version = "0.1.1"
421
+ source = "registry+https://github.com/rust-lang/crates.io-index"
422
+ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
423
+
393
424
  [[package]]
394
425
  name = "futures"
395
426
  version = "0.3.31"
@@ -644,6 +675,21 @@ dependencies = [
644
675
  "want",
645
676
  ]
646
677
 
678
+ [[package]]
679
+ name = "hyper-tungstenite"
680
+ version = "0.15.0"
681
+ source = "registry+https://github.com/rust-lang/crates.io-index"
682
+ checksum = "426356dc8c52c5a18c5a6c12226c03362f98e4723716074f8010051934cb451c"
683
+ dependencies = [
684
+ "http-body-util",
685
+ "hyper",
686
+ "hyper-util",
687
+ "pin-project-lite",
688
+ "tokio",
689
+ "tokio-tungstenite",
690
+ "tungstenite",
691
+ ]
692
+
647
693
  [[package]]
648
694
  name = "hyper-util"
649
695
  version = "0.1.17"
@@ -851,6 +897,44 @@ version = "11.1.5"
851
897
  source = "registry+https://github.com/rust-lang/crates.io-index"
852
898
  checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
853
899
 
900
+ [[package]]
901
+ name = "openssl"
902
+ version = "0.10.75"
903
+ source = "registry+https://github.com/rust-lang/crates.io-index"
904
+ checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328"
905
+ dependencies = [
906
+ "bitflags",
907
+ "cfg-if",
908
+ "foreign-types",
909
+ "libc",
910
+ "once_cell",
911
+ "openssl-macros",
912
+ "openssl-sys",
913
+ ]
914
+
915
+ [[package]]
916
+ name = "openssl-macros"
917
+ version = "0.1.1"
918
+ source = "registry+https://github.com/rust-lang/crates.io-index"
919
+ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
920
+ dependencies = [
921
+ "proc-macro2",
922
+ "quote",
923
+ "syn",
924
+ ]
925
+
926
+ [[package]]
927
+ name = "openssl-sys"
928
+ version = "0.9.111"
929
+ source = "registry+https://github.com/rust-lang/crates.io-index"
930
+ checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321"
931
+ dependencies = [
932
+ "cc",
933
+ "libc",
934
+ "pkg-config",
935
+ "vcpkg",
936
+ ]
937
+
854
938
  [[package]]
855
939
  name = "parking_lot"
856
940
  version = "0.12.4"
@@ -892,6 +976,12 @@ version = "0.1.0"
892
976
  source = "registry+https://github.com/rust-lang/crates.io-index"
893
977
  checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
894
978
 
979
+ [[package]]
980
+ name = "pkg-config"
981
+ version = "0.3.32"
982
+ source = "registry+https://github.com/rust-lang/crates.io-index"
983
+ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
984
+
895
985
  [[package]]
896
986
  name = "plotters"
897
987
  version = "0.3.7"
@@ -1135,12 +1225,69 @@ version = "0.8.6"
1135
1225
  source = "registry+https://github.com/rust-lang/crates.io-index"
1136
1226
  checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"
1137
1227
 
1228
+ [[package]]
1229
+ name = "ring"
1230
+ version = "0.17.14"
1231
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1232
+ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
1233
+ dependencies = [
1234
+ "cc",
1235
+ "cfg-if",
1236
+ "getrandom",
1237
+ "libc",
1238
+ "untrusted",
1239
+ "windows-sys 0.52.0",
1240
+ ]
1241
+
1138
1242
  [[package]]
1139
1243
  name = "rustc-demangle"
1140
1244
  version = "0.1.26"
1141
1245
  source = "registry+https://github.com/rust-lang/crates.io-index"
1142
1246
  checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
1143
1247
 
1248
+ [[package]]
1249
+ name = "rustls"
1250
+ version = "0.23.36"
1251
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1252
+ checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
1253
+ dependencies = [
1254
+ "once_cell",
1255
+ "ring",
1256
+ "rustls-pki-types",
1257
+ "rustls-webpki",
1258
+ "subtle",
1259
+ "zeroize",
1260
+ ]
1261
+
1262
+ [[package]]
1263
+ name = "rustls-pemfile"
1264
+ version = "2.2.0"
1265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1266
+ checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
1267
+ dependencies = [
1268
+ "rustls-pki-types",
1269
+ ]
1270
+
1271
+ [[package]]
1272
+ name = "rustls-pki-types"
1273
+ version = "1.14.0"
1274
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1275
+ checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
1276
+ dependencies = [
1277
+ "zeroize",
1278
+ ]
1279
+
1280
+ [[package]]
1281
+ name = "rustls-webpki"
1282
+ version = "0.103.9"
1283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1284
+ checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
1285
+ dependencies = [
1286
+ "ring",
1287
+ "rustls-pki-types",
1288
+ "untrusted",
1289
+ ]
1290
+
1144
1291
  [[package]]
1145
1292
  name = "rustversion"
1146
1293
  version = "1.0.22"
@@ -1231,6 +1378,12 @@ dependencies = [
1231
1378
  "lazy_static",
1232
1379
  ]
1233
1380
 
1381
+ [[package]]
1382
+ name = "shlex"
1383
+ version = "1.3.0"
1384
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1385
+ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
1386
+
1234
1387
  [[package]]
1235
1388
  name = "signal-hook-registry"
1236
1389
  version = "1.4.6"
@@ -1283,6 +1436,12 @@ dependencies = [
1283
1436
  "windows-sys 0.59.0",
1284
1437
  ]
1285
1438
 
1439
+ [[package]]
1440
+ name = "subtle"
1441
+ version = "2.6.1"
1442
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1443
+ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
1444
+
1286
1445
  [[package]]
1287
1446
  name = "syn"
1288
1447
  version = "2.0.106"
@@ -1391,6 +1550,27 @@ dependencies = [
1391
1550
  "syn",
1392
1551
  ]
1393
1552
 
1553
+ [[package]]
1554
+ name = "tokio-openssl"
1555
+ version = "0.6.5"
1556
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1557
+ checksum = "59df6849caa43bb7567f9a36f863c447d95a11d5903c9cc334ba32576a27eadd"
1558
+ dependencies = [
1559
+ "openssl",
1560
+ "openssl-sys",
1561
+ "tokio",
1562
+ ]
1563
+
1564
+ [[package]]
1565
+ name = "tokio-rustls"
1566
+ version = "0.26.4"
1567
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1568
+ checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"
1569
+ dependencies = [
1570
+ "rustls",
1571
+ "tokio",
1572
+ ]
1573
+
1394
1574
  [[package]]
1395
1575
  name = "tokio-stream"
1396
1576
  version = "0.1.17"
@@ -1529,7 +1709,7 @@ dependencies = [
1529
1709
 
1530
1710
  [[package]]
1531
1711
  name = "turbonet"
1532
- version = "0.4.16"
1712
+ version = "0.5.21"
1533
1713
  dependencies = [
1534
1714
  "anyhow",
1535
1715
  "bytes",
@@ -1539,19 +1719,25 @@ dependencies = [
1539
1719
  "futures-util",
1540
1720
  "http-body-util",
1541
1721
  "hyper",
1722
+ "hyper-tungstenite",
1542
1723
  "hyper-util",
1543
1724
  "itoa",
1544
1725
  "memchr",
1545
1726
  "num_cpus",
1727
+ "openssl",
1546
1728
  "pin-project-lite",
1547
1729
  "pyo3",
1548
1730
  "pyo3-async-runtimes",
1549
1731
  "rayon",
1732
+ "rustls",
1733
+ "rustls-pemfile",
1550
1734
  "ryu",
1551
1735
  "serde",
1552
1736
  "serde_json",
1553
1737
  "simd-json",
1554
1738
  "tokio",
1739
+ "tokio-openssl",
1740
+ "tokio-rustls",
1555
1741
  "tokio-test",
1556
1742
  "tokio-tungstenite",
1557
1743
  "tracing",
@@ -1576,6 +1762,12 @@ version = "0.2.4"
1576
1762
  source = "registry+https://github.com/rust-lang/crates.io-index"
1577
1763
  checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
1578
1764
 
1765
+ [[package]]
1766
+ name = "untrusted"
1767
+ version = "0.9.0"
1768
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1769
+ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
1770
+
1579
1771
  [[package]]
1580
1772
  name = "utf-8"
1581
1773
  version = "0.7.6"
@@ -1600,6 +1792,12 @@ dependencies = [
1600
1792
  "ryu",
1601
1793
  ]
1602
1794
 
1795
+ [[package]]
1796
+ name = "vcpkg"
1797
+ version = "0.2.15"
1798
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1799
+ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
1800
+
1603
1801
  [[package]]
1604
1802
  name = "version_check"
1605
1803
  version = "0.9.5"
@@ -1860,3 +2058,9 @@ dependencies = [
1860
2058
  "quote",
1861
2059
  "syn",
1862
2060
  ]
2061
+
2062
+ [[package]]
2063
+ name = "zeroize"
2064
+ version = "1.8.2"
2065
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2066
+ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "turbonet"
3
- version = "0.4.16"
3
+ version = "0.5.21"
4
4
  edition = "2021"
5
5
  authors = ["Rach Pradhan <rach@turboapi.dev>"]
6
6
  description = "High-performance Python web framework core - Rust-powered HTTP server with Python 3.14 free-threading support, FastAPI-compatible security and middleware"
@@ -17,8 +17,10 @@ name = "turbonet"
17
17
  crate-type = ["cdylib", "rlib"]
18
18
 
19
19
  [features]
20
- default = ["python"]
20
+ default = ["python", "tls-rustls"]
21
21
  python = ["pyo3"]
22
+ tls-rustls = ["rustls", "tokio-rustls", "rustls-pemfile"]
23
+ tls-openssl = ["openssl", "tokio-openssl"]
22
24
 
23
25
  [dependencies]
24
26
  pyo3 = { version = "0.26.0", features = ["extension-module"], optional = true }
@@ -29,6 +31,7 @@ hyper-util = { version = "0.1.10", features = ["full", "http2"] }
29
31
  http-body-util = "0.1.2"
30
32
  pin-project-lite = "0.2.15"
31
33
  tokio-tungstenite = "0.24"
34
+ hyper-tungstenite = "0.15"
32
35
  futures-util = "0.3"
33
36
  serde = { version = "1.0", features = ["derive"] }
34
37
  serde_json = "1.0"
@@ -45,6 +48,14 @@ simd-json = "0.14"
45
48
  itoa = "1.0"
46
49
  ryu = "1.0"
47
50
 
51
+ # TLS support (rustls with ring backend for cross-compilation compatibility)
52
+ # Using ring instead of aws-lc-rs because aws-lc-rs requires complex cross-compilation setup
53
+ rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"], optional = true }
54
+ tokio-rustls = { version = "0.26", default-features = false, features = ["ring"], optional = true }
55
+ rustls-pemfile = { version = "2.0", optional = true }
56
+ openssl = { version = "0.10", optional = true }
57
+ tokio-openssl = { version = "0.6", optional = true }
58
+
48
59
  [dev-dependencies]
49
60
  criterion = { version = "0.5", features = ["html_reports"] }
50
61
  tokio-test = "0.4"
@@ -0,0 +1,53 @@
1
+ .PHONY: help test build install clean benchmark
2
+
3
+ help:
4
+ @echo "TurboAPI Development Commands"
5
+ @echo "=============================="
6
+ @echo ""
7
+ @echo "Testing:"
8
+ @echo " make test - Run all tests"
9
+ @echo ""
10
+ @echo "Building:"
11
+ @echo " make build - Build wheel"
12
+ @echo " make install - Install in development mode"
13
+ @echo " make clean - Clean build artifacts"
14
+ @echo ""
15
+ @echo "Benchmarks:"
16
+ @echo " make benchmark - Run benchmarks and generate charts"
17
+ @echo ""
18
+
19
+ # Run tests
20
+ test:
21
+ @echo "🧪 Running tests..."
22
+ @python -m pytest tests/ -v --tb=short
23
+
24
+ # Build wheel
25
+ build:
26
+ @echo "📦 Building wheel..."
27
+ @maturin build --release
28
+
29
+ # Install in development mode
30
+ install:
31
+ @echo "🔧 Installing in development mode..."
32
+ @maturin develop --release
33
+
34
+ # Clean build artifacts
35
+ clean:
36
+ @echo "🧹 Cleaning build artifacts..."
37
+ @rm -rf target/
38
+ @rm -rf dist/
39
+ @rm -rf build/
40
+ @rm -rf *.egg-info
41
+ @find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
42
+ @find . -type f -name "*.pyc" -delete
43
+ @find . -type f -name "*.so" -delete
44
+ @echo "✅ Clean complete"
45
+
46
+ # Run benchmarks
47
+ benchmark:
48
+ @echo "📊 Running benchmarks..."
49
+ @PYTHON_GIL=0 python benchmarks/run_benchmarks.py
50
+ @echo ""
51
+ @echo "📈 Generating charts..."
52
+ @python benchmarks/generate_charts.py
53
+ @echo "✅ Benchmarks complete! Charts saved to assets/"