-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCargo.toml
More file actions
106 lines (88 loc) · 3.12 KB
/
Copy pathCargo.toml
File metadata and controls
106 lines (88 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[workspace]
members = [
"ryx-core",
"ryx-backend",
"ryx-query",
"ryx-python",
"ryx-common",
"ryx-macro",
"ryx-rs",
]
resolver = "2"
[workspace.package]
name = "ryx"
version = "0.1.0"
edition = "2024"
authors = ["AllDotPy", "Ryx Contributors"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/AllDotPy/Ryx"
homepage = "https://github.com/AllDotPy/Ryx"
documentation = "https://docs.rs/Ryx"
[workspace.dependencies]
# PyO3
# "extension-module" is required when building a cdylib for Python import.
# Without it, PyO3 tries to link against libpython, which breaks on Linux/macOS
# when Python dynamically loads the extension.
pyo3 = { version = "0.28.3", features = ["extension-module"] }
# Async bridge
# pyo3-async-runtimes is the maintained successor of the abandoned pyo3-asyncio.
# The "tokio-runtime" feature wires Rust Futures into Python's asyncio event
# loop via tokio — users simply `await` our ORM calls from Python.
pyo3-async-runtimes = { version = "0.28.0", features = ["attributes", "async-std-runtime", "tokio-runtime"] }
# sqlx
# We use sqlx 0.8.x (stable). The "runtime-tokio" feature is mandatory since
# we drive everything through tokio. "macros" enables the query!/query_as!
# macros if needed later. "chrono" adds DateTime support.
sqlx = { version = "0.8.6", features = [
"runtime-tokio",
"macros",
"chrono",
"uuid",
"json",
"any",
"postgres",
"mysql",
"sqlite"
], default-features = false }
# Tokio
# Full tokio runtime. "full" is fine for a library crate — callers can restrict
# features if they need a lighter binary.
tokio = { version = "1.40", features = ["full"] }
smallvec = { version = "1.13", features = ["serde"] }
chrono = { version = "0.4", default-features = false, features = ["clock"] }
# Serialization
# serde + serde_json: used to pass structured data between Rust and Python
# (row data, query parameters, etc.)
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Utilities
# thiserror: ergonomic error type derivation. We define a rich BityaError type
# that converts cleanly into Python exceptions via PyO3's IntoPy trait.
thiserror = "2"
# once_cell: used to store the global tokio Runtime and the connection pool
# as lazily-initialized singletons. Using std::sync::OnceLock would also work
# on Rust 1.70+, but once_cell has a slightly nicer API for our use case.
once_cell = "1"
# Config file parsing (optional, used by ryx-rs config module)
toml = "0.8"
serde_yaml = "0.9"
# CLI (ryx-rs binary)
clap = { version = "4", features = ["derive"] }
# tracing: structured, async-aware logging. We instrument every SQL execution
# so users can enable RUST_LOG=ryx=debug for full query visibility.
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
#
# Profiles — favor peak perf in release builds (used by maturin/pip wheels).
# LTO thin keeps link times reasonable while enabling cross-crate inlining.
# codegen-units=1 avoids missed inlining across crates.
#
[profile.release]
lto = "thin"
codegen-units = 1
opt-level = 3
strip = "debuginfo"
panic = "unwind"
[profile.dev]
opt-level = 3
debug = true