Embed full argv at build time + README refresh (v0.9.1) - #43
Merged
Conversation
Adds RUSNEL_EMBED_ARGS to bake the entire default invocation (subcommand + flags + positional args) into the binary at build time, turning a pre-configured Rusnel into a true zero-config drop-and-run executable: launching it with no arguments runs the embedded command, while any explicit CLI args (including --help and other subcommands) still override. Build-time shlex-splitting surfaces quoting errors as a cargo build failure rather than a runtime panic in the deployed binary. Also refreshes the README: - reordered Server admin API section to sit after Authentication and Logging - collapsed embedded-credentials docs to a single representative drop-and-run example - trimmed admin API + logging sections to high-level prose, dropping internals (atomics ordering, span schema table) better suited to code docs 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.
Summary
RUSNEL_EMBED_ARGSbuild-time env var. Bakes the entire defaultinvocation (subcommand + flags + positional args, shell-quoted) into
the binary. When the resulting executable is launched with no CLI
arguments, those baked-in args are used as the argv. Combined with
the existing
RUSNEL_EMBED_*credential vars, this produces a truezero-config drop-and-run binary that connects, authenticates, and
starts forwarding the moment it's run. Any explicit runtime args
still win, so
--help,cert,ctl, and ad-hoc overrides keepworking on a pre-configured build.
shlex-splitting (added as a[build-dependencies])means quoting errors fail the build, not the deployment.
build.rsemitsEMBED_ARGS: Option<&[&str]>;main.rs::resolve_argvsplices it in afterargv[0]only when noCLI args were passed.
README refresh
Server admin API & rusnel ctlsection to sit afterAuthenticationandLogging.long internals paragraph to one representative drop-and-run example
paragraph and the logging-span schema table — high-level prose only,
internals belong in code docs.
Net README diff: -60 lines, no section removed.
Made with Cursor