You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.1 KiB
2.1 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| [TRIAGE] workers-rs compatibility with native Rust test binaries (may need separate native feature flag) | completed | task | critical | 2026-03-10T23:32:09Z | 2026-03-10T23:32:09Z |
Note: target_env = "worker" is incorrect. The right discriminant is target_arch = "wasm32".
The cfg(target_arch) split is cleaner than a feature flag because it is tied to the actual
build target, not an opt-in flag that could be forgotten:
[target.'cfg(target_arch = "wasm32")'.dependencies]→ workers-rs (pulled in only for WASM)[target.'cfg(not(target_arch = "wasm32"))'.dependencies]→ tokio, axum, rusqlite (native only)
In main.rs:
#[cfg(target_arch = "wasm32")]
#[worker::event(fetch)]
pub async fn main(...) { /* workers-rs entry point */ }
#[cfg(not(target_arch = "wasm32"))]
#[tokio::main]
async fn main() { /* native Axum server on :8080 */ }
cargo test (native host) automatically compiles the native path. No special flags.
No feature flag pollution. Resolved as part of TRIAGE e8a330 (DB strategy decision).
See implementation ticket 00aff0 for full details.
`chore(quotesdb): resolve triage — workersrs-compatibility-with-native-rust-test-binaries-may-n`