feat(sidecar): a Windows service, the egg and its launcher, and the first release workflow (phase 18) #13
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/phase-18-release"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 4 of the phase-18 build order (docs/modules/rust/PLAN.md §34.2.7), into
edge. The cutover follows as its own PR. Its merge cuts this repository's first release, and with Rust-Plugins released first,v2/rust/current.jsonexists for the first time.The Windows service (D149, §34.2.5)
src/windows.rs, ported fromlink's fix for error 1053..exetries the SCM handshake and falls back to a console run on error 1063.Runningonly once the listener and the store are up.RunicGatewayRust-<id>instance, because the SCM ignores the dispatcher's name for an own-process service.A fix D152 needed: an empty variable now counts as unset.
RUSTLINK_WEB_TOKENarrives as"".apply_envtreated that as an override. It blanked the saved token, and the sidecar generated and persisted a new one on every boot.INSTALL_RIG.md's launcher only avoided exporting empty variables, which does nothing when the panel has already exported them.--print-configruns withRUSTLINK_WEB_TOKEN=""now givetoken_generatedtrue, false, false, with the same token each time.The egg (R20, R22, D151, D152, §34.2.6), in
egg/:install.shis egg 18's script with two changes:rust-link/is moved to/tmparoundrm -rf ${REMOVE_FILES}.RUNICGATEWAY_BUNDLE;FRAMEWORK./raw/, which is CDN-cached for hours.with-sidecar.shis the launcher:RUSTLINK_WEB_PORT;/admin/rust/servers;execs the game. The game image has nojq, so the launcher parses withsed.build.shassemblesegg-rust-runicgateway.json, and PR Checks runs it.The release (D145, §34.2.1)
link's: credential preflight, orphan-tag recovery and sweep, retry on 5xx.linux-x86_64binary (checked not to be dynamically linked), thewindows-x86_64.exe,with-sidecar.sh, the egg, andSHA256SUMS.bundle.yml.Three things for your review
$( [ -x ./rust-link/with-sidecar.sh ] && printf %s ./rust-link/with-sidecar.sh ) <egg 18's startup>. §34.4 says vanilla installs nothing and must still boot, but an unconditional prefix would fail to start a vanilla server. This is the same$( … )pattern the base startup already uses forMAP_URL. Tested through the image's real entrypointeval: with the launcher present the prefix appears, and without it the startup is egg 18's unchanged.set -e. Everything before the last line belongs to the bridge, and the last line belongs to the game. My first test hit an unwritablerust-link/, theset -elauncher died beforeexec, and the game never started. Now each step reports its own failure and the game always starts.authorisci@whitlocktech.com, the address the CI jobs already use, because egg 18's author is Pterodactyl's. Tell me if you'd rather it said something else.Tested
-D warnings, 63 tests..exebuilt.compose-bundles.shcomposedv2/rustfrom them.ghcr.io/ptero-eggs/installers:debian:REMOVE_FILES="* rust-link rust-link/* .*": the map was deleted, and the token and database hashes were unchanged.ghcr.io/pterodactyl/games:rust, with Carbon'sLD_PRELOADset:/healthanswered on the typed port, and the game was PID 1.Still to do, per §34.3: the real walk, importing the released egg in the panel (yours) and the SCM step from an elevated shell (yours).
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
Module-rust phase 18, step 4 of docs/modules/rust/PLAN.md §34.2.7. The Windows service (D149, §34.2.5): src/windows.rs, ported from link's fix for error 1053. The same exe tries the SCM handshake and falls through to a console run on 1063; it reports Running only once the listener and store are up, and logs to a daily file beside its config. One binary serves every RunicGatewayRust-<id> instance, because the SCM ignores the dispatcher's name for an own-process service. An empty environment variable now counts as unset. A Pterodactyl egg exports every variable it declares, so a blank RUSTLINK_WEB_TOKEN arrived as "" and overrode the saved token, and a new one was generated and persisted on every boot. That breaks D152, which this change makes true. The egg (R20, R22, D151, D152, §34.2.6), in egg/: - install.sh is egg 18's script with two changes. A wipe guard moves rust-link/ to /tmp around `rm -rf ${REMOVE_FILES}`. The bridge block then fetches a schema-2 Rust bundle (pinnable by RUNICGATEWAY_BUNDLE), checks every asset's sha256 and the plugin's protocol before placing anything, and places the plugin by FRAMEWORK. Vanilla installs nothing and does not fail. - with-sidecar.sh is the launcher. It unsets blank variables, builds the web bind from RUSTLINK_WEB_PORT, and runs --print-config so that a newly generated token is printed once. It prints the URL and server id for the admin page, then execs the game. It no longer uses `set -e`: nothing the bridge gets wrong may keep the game from booting. - The startup's launcher prefix is conditional, so a server with no bridge boots exactly as egg 18 does. - build.sh assembles egg-rust-runicgateway.json. PR Checks runs it. The release (D145, §34.2.1) reuses servuo-plugins' engine. It publishes the static musl Linux binary, the Windows exe, the launcher, the egg and SHA256SUMS, and dispatches the installer's bundle.yml. PR Checks gains a clippy run for the Windows target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY