-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCargo.toml
More file actions
130 lines (111 loc) · 5.06 KB
/
Cargo.toml
File metadata and controls
130 lines (111 loc) · 5.06 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[package]
name = "openworkers-runner"
version = "0.14.5"
edition = "2024"
license = "MIT"
default-run = "openworkers-runner"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["database"]
v8 = ["dep:openworkers-runtime-v8"]
multiplexing = ["openworkers-runtime-v8/multiplexing"]
wasm = ["dep:openworkers-runtime-wasm", "openworkers-core/wasm"]
database = ["dep:postgate"]
telemetry = [
"dep:opentelemetry",
"dep:opentelemetry-otlp",
"dep:opentelemetry_sdk",
"dep:tracing-opentelemetry",
"dep:opentelemetry-appender-tracing",
"dep:tonic",
]
# Disabled runtimes (require core 0.5, we're on 0.7) - kept as empty features to avoid cfg warnings
deno = []
quickjs = []
boa = []
jsc = []
[dependencies]
# HTTP server (hyper)
hyper = { version = "1", features = ["server", "http1"] }
hyper-util = { version = "0.1", features = ["tokio"] }
http-body-util = "0.1"
bytes = "1.11.0"
log = "0.4.29"
tokio = "1.49.0"
tokio-util = { version = "0.7", features = ["rt"] }
once_cell = "1.19"
# filetime = "0.2" # was used by disk-based snapshot cache
env_logger = "0.11.6"
lru = "0.16.3"
# Tracing (always available)
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# OpenTelemetry (optional, via telemetry feature)
opentelemetry = { version = "0.31", optional = true }
opentelemetry-otlp = { version = "0.31", features = ["grpc-tonic", "tls-roots"], optional = true }
tonic = { version = "0.14", optional = true }
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio"], optional = true }
tracing-opentelemetry = { version = "0.32", optional = true }
opentelemetry-appender-tracing = { version = "0.31", features = ["experimental_use_tracing_span_context"], optional = true }
sqlx = { version = "0.8.6", features = [ "runtime-tokio", "postgres", "uuid", "bigdecimal", "rust_decimal", "tls-rustls" ] }
reqwest = { version = "0.13.1", default-features = false, features = ["rustls", "json", "stream"] }
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-webpki-roots"] }
rustls = { version = "0.23", features = ["ring"] }
# Core types
openworkers-core = { git = "https://github.com/openworkers/openworkers-core", tag = "v0.14.0", features = ["hyper"] }
# Transform (TS strip + export default → globalThis.default)
# openworkers-transform = { path = "../openworkers-transform" }
openworkers-transform = { git = "https://github.com/openworkers/openworkers-transform", tag = "v0.1.0" }
# Runtime backends
openworkers-runtime-v8 = { git = "https://github.com/openworkers/openworkers-runtime-v8", tag = "v0.14.0", optional = true, features = ["ptrcomp"] }
# WASM runtime (optional)
# openworkers-runtime-wasm = { path = "../openworkers-runtime-wasm", optional = true }
openworkers-runtime-wasm = { git = "https://github.com/openworkers/openworkers-runtime-wasm", tag = "v0.1.0", optional = true }
# Database bindings (optional)
# postgate = { path = "../postgate", default-features = false, optional = true }
postgate = { git = "https://github.com/openworkers/postgate", tag = "v0.1.7", default-features = false, optional = true }
# Disabled runtimes (require openworkers-core 0.5, we're on 0.9)
# openworkers-runtime-deno = { git = "https://github.com/openworkers/openworkers-runtime-deno", tag = "v0.5.1", optional = true }
# openworkers-runtime-quickjs = { git = "https://github.com/openworkers/openworkers-runtime-quickjs", tag = "v0.5.1", optional = true }
# openworkers-runtime-boa = { git = "https://github.com/openworkers/openworkers-runtime-boa", tag = "v0.5.1", optional = true }
# openworkers-runtime-jsc = { git = "https://github.com/openworkers/openworkers-runtime-jsc", tag = "v0.5.3", optional = true }
# Local paths (for development)
# openworkers-runtime-deno = { path = "../openworkers-runtime-deno", optional = true }
# openworkers-runtime-quickjs = { path = "../openworkers-runtime-quickjs", optional = true }
# openworkers-runtime-boa = { path = "../openworkers-runtime-boa", optional = true }
# openworkers-runtime-jsc = { path = "../openworkers-runtime-jsc", optional = true }
async-nats = "0.46.0"
futures = "0.3"
serde_json = "1.0"
serde = { version = "1.0.197", features = ["derive"] }
base64 = "0.22.1"
aws-sigv4 = "1.2"
aws-credential-types = "1.2"
chrono = "0.4.43"
sha2 = "0.10"
hex = "0.4"
uuid = { version = "1.20", features = ["v4"] }
url = "2.5"
dotenvy = "0.15.7"
percent-encoding = "2.3.2"
# https://doc.rust-lang.org/cargo/reference/profiles.html
# https://github.com/johnthagen/min-sized-rust?tab=readme-ov-file#minimizing-rust-binary-size
[profile.release]
strip = true # Automatically strip symbols from the binary.
opt-level = "z" # Optimize for size.
incremental = true # Enable incremental compilation.
codegen-units = 1 # Use a single codegen unit to optimize for size.
lto = true # Enable link-time optimization.
[dev-dependencies]
criterion = { version = "0.8.1", features = ["async_tokio"] }
wat = "1.0"
serial_test = "3.2"
[[bin]]
name = "openworkers-runner"
path = "bin/main.rs"
[[bin]]
name = "snapshot"
path = "bin/snapshot.rs"
[[bench]]
name = "worker_benchmark"
harness = false