Skip to content

Embed full argv at build time + README refresh (v0.9.1) - #43

Merged
guyte149 merged 1 commit into
masterfrom
feat/embed-args-and-readme-refresh
May 5, 2026
Merged

Embed full argv at build time + README refresh (v0.9.1)#43
guyte149 merged 1 commit into
masterfrom
feat/embed-args-and-readme-refresh

Conversation

@guyte149

@guyte149 guyte149 commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • RUSNEL_EMBED_ARGS build-time env var. Bakes the entire default
    invocation (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 true
    zero-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 keep
    working on a pre-configured build.
  • Build-time shlex-splitting (added as a [build-dependencies])
    means quoting errors fail the build, not the deployment.
  • Implementation: build.rs emits EMBED_ARGS: Option<&[&str]>;
    main.rs::resolve_argv splices it in after argv[0] only when no
    CLI args were passed.

README refresh

  • Reordered the Server admin API & rusnel ctl section to sit after
    Authentication and Logging.
  • Collapsed embedded-credentials docs from three build examples + a
    long internals paragraph to one representative drop-and-run example
    • a single-line var list.
  • Trimmed admin-API and logging sections: dropped the atomics-ordering
    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

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>
@guyte149
guyte149 merged commit 99c9b4a into master May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant