See the "knock-come" described at https://www.teigfam.net/oyvind/home/technology/009-the-knock-come-deadlock-free-pattern/
This is an implementation of the Knock-come pattern as described in the above note.
This is my first ever Rust project.
Also see https://github.com/Aclassifier/xc_test_knock_come
The project includes a robust automation workflow through the build_app.sh script, which treats the Rust source code (rust_test_knock_come.rs) as the single source of truth.
- Dynamic extraction: The script parses the Rust file using
grepandsedto automatically extract the active semantic mode, version number, and the exact app bundle name defined inside theCURRENT_APP_NAMEmatch block - Safe configuration injecting: To package the application with context-specific metadata without altering project files permanently, the script creates a temporary backup (
Cargo.toml.bak) and injects the extracted strings into placeholder slots inCargo.toml - Zero-side-effect bundling: It triggers the compilation via
cargo bundle --release. Immediately after compilation—regardless of success or failure—the modified configuration is discarded and the pristine, originalCargo.tomlis fully restored from the backup, ensuring a clean and failure-proof build cycle - The newer
cargo-packagershould in the future perhaps be used instead ofcargo-bundle
I have used Gemini (Google AI) as a great sparring partner during the development. It was like having an expert "friend" beside me. One to ask, trust and doubt - over and over. Good for a retired person sitting alone! Without it, this code wouldn't have existed!
Initially I also tested Claude (Anthropic), but hourly usage limits led me away from it.