Add stdio remotes, drop R/, log to stderr (v0.8.2) - #41
Merged
Conversation
Three changes that bring the remote-syntax parser to chisel parity and make `stdio:` remotes actually usable: - Add `stdio:<host>:<port>` (and `stdio:<port>`, defaulting remote host to 127.0.0.1) forward remotes. The client pipes its own stdin/stdout to/from the QUIC stream instead of binding a local listener; on stdin EOF the session shuts down cleanly. Server-side dispatch is unchanged. Reverse stdio (`R:stdio:...`) and `stdio:socks` are rejected at parse time. Wire model: new `stdio: bool` on `RemoteRequest`, serialized with `#[serde(default)]`. - Drop the Rusnel-specific `R/` reverse-prefix shorthand. Chisel only accepts `R:` and we now match exactly. `R/foo` is now a parse error. - Initialize tracing with `with_writer(std::io::stderr)` for all CLI modes. Required for stdio (stdout is the data plane); good practice for the rest. Tests: 12 new parser unit tests for the stdio + R/ changes, plus a new `tests/stdio.rs` e2e smoke that spawns the rusnel binary as a subprocess with a stdio remote pointing at an in-process echo target, round-trips three framed messages through its stdin/stdout, and asserts the child exits 0 after stdin EOF. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes that bring the remote-syntax parser to chisel parity and make
stdio:remotes actually usable:Add
stdio:<host>:<port>(andstdio:<port>, defaulting remote host to 127.0.0.1) forward remotes. The client pipes its own stdin/stdout to/from the QUIC stream instead of binding a local listener; on stdin EOF the session shuts down cleanly. Server-side dispatch is unchanged. Reverse stdio (R:stdio:...) andstdio:socksare rejected at parse time. Wire model: newstdio: boolonRemoteRequest, serialized with#[serde(default)].Drop the Rusnel-specific
R/reverse-prefix shorthand. Chisel only acceptsR:and we now match exactly.R/foois now a parse error.Initialize tracing with
with_writer(std::io::stderr)for all CLI modes. Required for stdio (stdout is the data plane); good practice for the rest.Tests: 12 new parser unit tests for the stdio + R/ changes, plus a new
tests/stdio.rse2e smoke that spawns the rusnel binary as a subprocess with a stdio remote pointing at an in-process echo target, round-trips three framed messages through its stdin/stdout, and asserts the child exits 0 after stdin EOF.