Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ streamlib_modules/
*.slpkg

# Cargo `[patch]` scratch a `streamlib link` may drop
.cargo/config.toml
**/.cargo/config.toml

# Python
__pycache__/
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,35 @@ These packages were extracted from the
2026-07-14 as a source snapshot. **Git history prior to 2026-07-14 lives in
tatolab/streamlib** — this repo starts fresh and does not carry the pre-split
commit history.

## Running the package tests

Each package's self-contained tests (`packages/network/tests/network_packet_serde_bytes_wire_format.rs`,
`packages/vadr-vision/tests/reassembly_integration.rs`) build against a
linked streamlib checkout. Packages whose schemas reference other
packages (`mavlink`, `vadr-vision` → `@tatolab/network`; `vadr-vision` →
`@tatolab/jpeg`) additionally need a registry for schema resolution,
because sibling-directory resolution is not a thing — schemas resolve by
version from the link checkout's `packages/` tree or a registry, and
`@tatolab/network` no longer lives in the streamlib checkout.

The local dev-registry flow (no hosting required):

```bash
# 1. Emit a registry tree from a streamlib checkout (core, jpeg, …):
cd <streamlib-checkout>
cargo run -p xtask -- static-registry emit --out /tmp/dev-registry

# 2. Publish this repo's packages into the same tree:
export STREAMLIB_REGISTRY_URL="file:///tmp/dev-registry"
cd <this-repo>/packages/network && streamlib pkg publish

# 3. Link + test any package:
cd ../mavlink
streamlib link --engine <streamlib-checkout>
STREAMLIB_REGISTRY_URL="file:///tmp/dev-registry" cargo test
```

`legacy-tests/` holds inherited test files that predate the engine-free
conversion and need a rewrite against the module-loading flow before
they can run again — see `legacy-tests/README.md`.
33 changes: 33 additions & 0 deletions legacy-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Legacy tests — pre-engine-free relics (not compiled)

These test files were inherited from the streamlib monorepo snapshot but
predate the packages' conversion to the engine-free plugin SDK. They are
**not wired into any crate** and do not compile as written, for a
structural reason, not a missing-dependency reason:

Each of them registers the package processors **in-process** via
`PROCESSOR_REGISTRY.register::<streamlib_network::UdpSourceProcessor::Processor>()`
and then drives a `Runner` in the same process. That model only worked
when these packages compiled against the `streamlib` engine facade. As
engine-free packages, their processor types implement the plugin SDK's
traits — not the engine's — so in-process typed registration is
impossible by design (that is the capability split working as intended).

The correct rewrite is the **module-loading flow**: build/link the
package into a host's `streamlib_modules/` and let the runtime dlopen it
(`runtime.add_processor(processor_type_ref!(...))` with lazy module
discovery), the same shape as streamlib's `load_project_dylib_*`
integration tests. Until someone does that rewrite, the files are parked
here so the test logic (scenarios, assertions, fixtures) isn't lost:

| File | Original home | Pipeline exercised |
|---|---|---|
| `udp_loopback.rs` | packages/network | UdpSource → UdpSink loopback |
| `udp_burst_stress.rs` | packages/network | burst/overflow behavior |
| `udp_throughput_bench.rs` | packages/network | throughput measurement |
| `mavlink_over_udp.rs` | packages/mavlink | UdpSource → MavlinkDecoder → MavlinkEncoder → UdpSink round-trip |
| `udp_vadr_jpeg_e2e.rs` (+ `fixtures/`) | packages/vadr-vision | UDP chunks → depayloader → reassembly → JpegDecoder → frame counter (needs a GPU) |

The self-contained tests that survived the conversion still live in
their packages: `packages/network/tests/network_packet_serde_bytes_wire_format.rs`
and `packages/vadr-vision/tests/reassembly_integration.rs`.
File renamed without changes.
4 changes: 4 additions & 0 deletions packages/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ socket2 = "0.5"
libc = "0.2.177"
tracing = { version = "0.1.41", features = ["release_max_level_debug"] }

[dev-dependencies]
# The wire-format test decodes NetworkPacket from msgpack directly.
rmp-serde = "1.3"

[workspace]
Loading