feat: gate alloc/std features for no_std/no_alloc support

Gate generated code behind feature flags so consumers can build in
no_std/no_alloc environments:

- Runtime: gate RotoMessage, RotoOwned, BufMutBuilder behind alloc
- Codegen: split DATA_IMPORTS, gate Owned* structs + service code
- Fix RevBuilder::with() to iterate forward without Vec allocation
- Wire up bytes/std via alloc feature (Bytes requires Arc)
- Update consumer Cargo.toml files with proper feature chains
- Add no_std_test example for embedded validation
This commit is contained in:
2026-06-30 01:40:13 -04:00
parent 2ce65496ab
commit 2806772fd1
13 changed files with 304 additions and 955 deletions
+3 -2
View File
@@ -31,5 +31,6 @@ tonic-build = "0.12"
roto-codegen = { path = "../../codegen" }
[features]
default = ["alloc"]
alloc = []
default = ["std"]
std = ["roto-runtime/std", "alloc"]
alloc = ["roto-runtime/alloc"]