### Install @asupersync/browser Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/wasm_quickstart_migration.md Install the recommended default app-facing browser SDK. This is the recommended starting point for most browser runtime needs without framework adapters. ```bash npm install @asupersync/browser ``` -------------------------------- ### Minimal Bootstrap Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/skills/asupersync-mega-skill/references/GREENFIELD-PATTERNS.md Demonstrates the basic setup for an asupersync application using a single-threaded runtime and a request-scoped context. ```rust use asupersync::{Cx, Outcome}; use asupersync::proc_macros::scope; use asupersync::runtime::RuntimeBuilder; fn main() -> Result<(), asupersync::Error> { let rt = RuntimeBuilder::current_thread().build()?; rt.block_on(async { let cx = Cx::for_request(); scope!(cx, { cx.trace("worker running"); Outcome::ok(()) }); }); Ok(()) } ``` -------------------------------- ### Install hyperfine Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/benchmarking.md Installs the hyperfine tool for command-line micro-benchmarking. This is a one-time setup. ```bash # Install once rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_benchmark_docs cargo install hyperfine ``` -------------------------------- ### Run Minimal Supervised App Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/integration.md Executes a minimal supervised application example using rch. This demonstrates app start, GenServer start, client interactions, and clean shutdown. ```bash rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_spork_integration_docs cargo run --example spork_minimal_supervised_app ``` -------------------------------- ### Runnable Quick Start with join! Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/macro-dsl.md A fully runnable example demonstrating the use of the join! macro to concurrently execute two async operations and combine their results. Requires a runtime. ```rust use asupersync::proc_macros::join; use asupersync::runtime::RuntimeBuilder; fn main() { let rt = RuntimeBuilder::current_thread() .build() .expect("runtime"); let (a, b) = rt.block_on(async { join!(async { 1 }, async { 2 }) }); assert_eq!(a + b, 3); } ``` -------------------------------- ### Running Example Binaries Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/macro-dsl.md Command to execute example binaries for the Macro DSL, specifying the target directory and enabling necessary features. ```bash rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_macro_dsl_docs cargo run --example macros_basic --features proc-macros ``` -------------------------------- ### Tokio-Postgres Transaction Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_t6_migration_packs.md Shows the manual process of starting, executing, and committing a transaction in tokio-postgres. ```rust let tx = client.transaction().await?; tx.execute("INSERT INTO ...", &[]).await?; tx.commit().await?; ``` -------------------------------- ### Install cargo-flamegraph Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/benchmarking.md Installs the cargo-flamegraph tool for CPU profiling. This is a one-time setup. ```bash # Install once rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_benchmark_docs cargo install flamegraph ``` -------------------------------- ### Starting an Application Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/otp_comparison.md Migrates from OTP's application:start to Spork's AppSpec builder pattern for defining and starting applications. ```Rust AppSpec::builder("app").supervisor(sup_spec).compile()?.start(&cx).await ``` -------------------------------- ### Install @asupersync/browser-core Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/wasm_quickstart_migration.md Install the low-level ABI/types package for Browser Edition. Use this when raw ABI handles or metadata-driven compatibility checks are needed. ```bash npm install @asupersync/browser-core ``` -------------------------------- ### Proof Runner Pass Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/proof_runner_usage.md Example output when the proof runner completes successfully. ```text Completed. Proof: rch-routed lib-tests emitted 42 passed; supplemental rustfmt check passed. ``` -------------------------------- ### Install @asupersync/next Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/wasm_quickstart_migration.md Install the Next.js boundary adapter for Browser Edition. Use this when Next-specific client/server/edge boundary guidance is needed. Requires 'next', 'react', and 'react-dom'. ```bash npm install @asupersync/next next react react-dom ``` -------------------------------- ### Install asupersync Browser SDK Source: https://github.com/dicklesworthstone/asupersync/blob/main/README.md Install the asupersync browser SDK. Note: This is not yet published to npm and should be installed from workspace-local packages. ```bash # JS/TS SDK (not yet published to npm; use workspace-local packages for now) # npm install @asupersync/browser ``` -------------------------------- ### Tokio-Postgres Connection Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_t6_migration_packs.md An example of establishing a database connection using tokio-postgres, including spawning a background task for the connection. ```rust let (client, connection) = tokio_postgres::connect( "host=localhost user=app dbname=mydb", NoTls ).await?; tokio::spawn(async move { connection.await.unwrap(); }); ``` -------------------------------- ### Minimal Supervised Spork App Walkthrough Source: https://github.com/dicklesworthstone/asupersync/blob/main/README.md This example demonstrates a minimal supervised application using Spork. It is located in the repository's examples directory. ```rust src/examples/spork_minimal_supervised_app.rs ``` -------------------------------- ### MySQL Connection Setup: sqlx vs Asupersync Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_db_messaging_migration_packs_contract.md Compares MySQL connection setup between sqlx and Asupersync. Asupersync uses `MySqlConnection::connect`. ```rust Before (`sqlx`) `MySqlPoolOptions::new().connect(url).await?` ``` ```rust After (Asupersync) `MySqlConnection::connect(&cx, url).resolved()?` ``` -------------------------------- ### Lab Setup Steps Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_migration_lab_kpi_contract.md Outlines the initial steps for setting up a migration lab, including selecting personas and service archetypes, preparing the baseline, and recording initial metrics. ```text 1. Select persona (P-01..P-06) and service archetype (S-01..S-06) 2. Prepare baseline: build and test the service on tokio runtime 3. Record baseline metrics (compilation time, test count, p99 latency) 4. Start timer for FK-01 ``` -------------------------------- ### Example Structured Log Entry Source: https://github.com/dicklesworthstone/asupersync/blob/main/TESTING.md This is an example of a structured log entry for a test start event, including test ID, seed, and subsystem. Both start and end markers contain the same context. ```text INFO test_start test_id="cancellation_conformance" seed=0xDEADBEEF subsystem="cancellation" invariant="losers_drained" ``` -------------------------------- ### RaptorQ Builder Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/integration.md Demonstrates how to configure and build a RaptorQSender and RaptorQReceiver using a RuntimeProfile. Ensure necessary imports are present. ```rust use asupersync::config::{RaptorQConfig, RuntimeProfile}; use asupersync::raptorq::{RaptorQReceiverBuilder, RaptorQSenderBuilder}; let mut config = RuntimeProfile::Testing.to_config(); config.encoding.symbol_size = 512; config.encoding.repair_overhead = 1.10; let sender = RaptorQSenderBuilder::new() .config(config.clone()) .transport(sink) .build()?; let receiver = RaptorQReceiverBuilder::new() .config(config) .source(stream) .build()?; ``` -------------------------------- ### Setting up a Test Environment Source: https://github.com/dicklesworthstone/asupersync/blob/main/TESTING.md Demonstrates the typical pattern for initializing and configuring a TestEnvironment, including port allocation and service registration. Services are automatically torn down on drop. ```rust use asupersync::test_logging::*; let ctx = TestContext::new("my_e2e", 0xDEAD_BEEF); let mut env = TestEnvironment::new(ctx); // Allocate isolated ports let http_port = env.allocate_port("http")?; let ws_port = env.allocate_port("websocket")?; // Register services env.register_service(Box::new( DockerFixtureService::new("redis", "redis:7-alpine") .with_port_map(env.port_for("redis").unwrap(), 6379) .with_health_cmd(vec!["redis-cli", "ping"]), )); env.register_service(Box::new(TempDirFixture::new("workdir"))); // Start all and wait for readiness env.start_all_services()?; for (name, _) in env.health_check() { // Or use wait_until_healthy per-service before start_all } // Emit metadata to logs + artifact dir env.emit_metadata(); env.write_metadata_artifact(); // ... test body ... // Teardown is automatic on drop (or call env.teardown() explicitly) ``` -------------------------------- ### QUIC Connection Setup: Quinn vs. Asupersync Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_quic_h3_api_stabilization.md Compares the connection setup API between the older 'quinn' crate and the new 'asupersync' implementation. 'asupersync' requires explicit configuration and manual driving of handshake states. ```rust // BEFORE (quinn) let endpoint = quinn::Endpoint::server(config, addr)?; let conn = endpoint.accept().await?.await?; ``` ```rust // AFTER (asupersync) let config = NativeQuicConnectionConfig { role: StreamRole::Server, max_local_bidi: 128, max_local_uni: 128, send_window: 1_048_576, recv_window: 1_048_576, ..Default::default() }; let mut conn = NativeQuicConnection::new(config); // Drive handshake (caller manages I/O) conn.begin_handshake(&cx)?; conn.on_handshake_keys_available(&cx)?; conn.on_1rtt_keys_available(&cx)?; conn.on_handshake_confirmed(&cx)?; // conn.state() == QuicConnectionState::Established ``` -------------------------------- ### Get JSON Output Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/adoption/getting_started.md Add the --json flag to any command to receive machine-readable output. This example pipes the output to jq to extract the 'passed' status. ```bash frankenlab run 01_race_condition.yaml --json | jq .passed # => true ``` -------------------------------- ### Structured JSON Logging for CI Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/plans/database_testing_migration.md Example of structured JSON logs used for CI integration, showing test start, phase, and end events with timing information. ```json {"ts":1698765432123,"suite":"postgres_migration","test":"real_pg_cancelled_commit_marks_connection_for_rollback","event":"test_start"} {"ts":1698765432124,"suite":"postgres_migration","test":"real_pg_cancelled_commit_marks_connection_for_rollback","event":"phase","phase":"connect","phase_num":"0","elapsed_ms":"1"} {"ts":1698765432200,"suite":"postgres_migration","test":"real_pg_cancelled_commit_marks_connection_for_rollback","event":"test_end","result":"pass","duration_ms":"77"} ``` -------------------------------- ### RaptorQ Conformance Test Execution Strategy Source: https://github.com/dicklesworthstone/asupersync/blob/main/conformance/raptorq_rfc6330/TEST_PRIORITY_MATRIX.md Outlines the phased approach for executing RaptorQ conformance tests, starting with infrastructure setup and progressing through P0 to P3 test levels. ```bash # Phase 1: Infrastructure (Week 1) ``` -------------------------------- ### Run PostgreSQL COPY FROM Evidence (Live Server) Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/mock_code_finder_proof_runbook.md Execute the PostgreSQL proof lane using a live server. Ensure the ASUPERSYNC_POSTGRES_TEST_URL environment variable is set. ```bash ASUPERSYNC_POSTGRES_TEST_URL= \ python3 scripts/run_mock_code_finder_evidence.py \ --child asupersync-zftrj9 \ --mode local \ --run-id postgres-live ``` -------------------------------- ### Get Current Time in Worker Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/wasm_hotpath_audit.md Captures the start time of a poll cycle. `std::time::Instant` is unavailable on `wasm32-unknown-unknown`. This should be adapted to use the existing `TimeSource` or `WallClock` abstraction, which can provide timestamps via `performance.now()` on WASM. ```rust let poll_start = Instant::now(); ``` -------------------------------- ### Good: Lock Scoping for Async Operations Source: https://github.com/dicklesworthstone/asupersync/blob/main/e2e_hardening_12_analysis.md This example demonstrates minimizing the scope of a mutex lock, especially in asynchronous operations. The lock is acquired only for the duration needed to get a database connection, preventing it from being held across potentially long-running async tasks. ```rust // ✅ GOOD: Minimize lock scope, don't hold across async async fn get_user(&self, cx: &Cx, user_id: i64) -> Result { let sql = format!("SELECT * FROM users WHERE user_id = {}", user_id); // Acquire connection without holding lock let connection = { let pool = self.db_pool.lock() .map_err(|_| Status::internal("Database pool poisoned"))?; pool.get_connection() .map_err(|e| Status::internal(format!("Connection failed: {}", e)))? }; // Lock released immediately // Execute async operation without holding lock let result = connection.execute_query(cx, sql).await?; // Return connection to pool (if needed) self.return_connection(connection); // Process result... } ``` -------------------------------- ### Install @asupersync/react Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/wasm_quickstart_migration.md Install the React client-boundary adapter for Browser Edition. Use this when running Browser Edition inside a client-rendered React tree. Requires 'react' and 'react-dom'. ```bash npm install @asupersync/react react react-dom ``` -------------------------------- ### Canonical Valid Example: Phase 1 Race Cancellation Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/lab_live_scenario_adapter_contract.md This YAML snippet defines a valid lab live scenario for a Phase 1 race where one branch completes successfully while the other is cancelled and cleaned up. It specifies participant roles, setup, operations, perturbations, and detailed expectations for the outcome, cancellation, and resource balancing. ```yaml schema_version: lab-live-scenario-spec-v1 scenario_id: phase1.cancel.race.one_loser surface_id: cancel.race surface_contract_version: cancel.race.v1 description: winner completes, losing branch is cancelled, drained, and region closes cleanly phase: Phase 1 seed_plan: canonical_seed: 90125 seed_lineage_id: seed.phase1.cancel.race.one_loser.v1 lab_seed_mode: inherit live_seed_mode: inherit replay_policy: single_seed participants: - id: client role: requester - id: fast_branch role: winner - id: slow_branch role: loser setup: runtime_profile: phase1.current_thread resource_contract: race.reply initial_state: branches: 2 expected_losers: 1 operations: - step_id: step.spawn_race actor: client op: spawn_race - step_id: step.complete_fast_branch actor: fast_branch op: complete_ok - step_id: step.cancel_slow_branch actor: client op: cancel_branch checkpoint: true - step_id: step.join_loser actor: slow_branch op: await_cleanup perturbations: - kind: cancel_at_checkpoint target: slow_branch trigger: after step.complete_fast_branch expected_witness: cancellation.requested=true expectations: normalized_schema_version: lab-live-normalized-observable-v1 required_semantics: terminal_outcome: class: ok surface_result: winner=fast_branch cancellation: requested: true acknowledged: true cleanup_completed: true finalization_completed: true terminal_phase: completed loser_drain: applicable: true expected_losers: 1 drained_losers: 1 status: complete region_close: quiescent: true live_children: 0 finalizers_pending: 0 close_completed: true obligation_balance: leaked: 0 unresolved: 0 balanced: true resource_surface: contract_scope: race.reply counters: winner_results: 1 tolerances: winner_results: exact mismatch_policy: missing_required_field: artifact_schema_violation unsupported_required_field: not_comparison_ready hard_mismatch: - terminal_outcome.class - loser_drain.status - region_close.quiescent - obligation_balance.balanced allowed_provenance_variance: - event_hash - schedule_hash - trace_fingerprint lab_binding: adapter: lab.spork_harness binding_id: phase1.cancel.race.one_loser config_projection: seed: inherit worker_count: 1 trace_capacity: 4096 max_steps: 100000 evidence_sources: - SporkScenarioResult.report - LabRunReport.quiescent - LabRunReport.trace_certificate live_binding: adapter: live.current_thread runtime_entry: RuntimeBuilder::current_thread() cx_mode: explicit_test_cx execution_style: run_test_with_cx witness_sources: - joined_handles - explicit_cancellation_witness - obligation_counters artifacts: repro_command_lab: rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_lab_live_scenario_docs cargo test --test lab_live_scenario_adapter_contract -- --nocapture repro_command_live: rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_lab_live_scenario_docs cargo test --test lab_live_scenario_adapter_contract -- --nocapture mismatch_bundle: artifacts/lab_live/phase1.cancel.race.one_loser/ summary_record: artifacts/lab_live/phase1.cancel.race.one_loser/summary.json seed_lineage_record: artifacts/lab_live/phase1.cancel.race.one_loser/seeds.json ``` -------------------------------- ### Run All Browser Onboarding Checks Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/wasm_canonical_examples.md Executes all available browser onboarding checks using a Python script. This is the preferred command for CI/replay bundles. ```bash python3 scripts/run_browser_onboarding_checks.py --scenario all ``` -------------------------------- ### Real Module Integration Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/e2e_hardening_consolidation.md Shows real module integration using asupersync's TLS acceptor and supervision strategy, replacing mock simulations with actual module APIs. ```rust use crate::tls::{TlsAcceptor, TlsAcceptorBuilder}; use crate::supervision::{SupervisionStrategy, RestartConfig, ChildName}; #[test] fn test_real_module_integration() { // ✅ Real TLS acceptor (with proper cert setup) let acceptor = TlsAcceptorBuilder::new() .with_single_cert(cert, key); // ✅ Real supervision strategy let strategy = SupervisionStrategy::Restart(RestartConfig { max_restarts: 3, window: Duration::from_secs(60), backoff: BackoffStrategy::Exponential { /* ... */ }, }); } ``` -------------------------------- ### Install Latest Stable Release Source: https://github.com/dicklesworthstone/asupersync/blob/main/examples/atp_j5_cli_examples.md Install the latest stable release of a specified release ID. The installation destination and verification are configurable. ```bash atp release install \ --release-id "asupersync" \ --version latest \ --dest /opt/asupersync \ --verify ``` -------------------------------- ### Set up Kafka Test Environment Source: https://github.com/dicklesworthstone/asupersync/blob/main/tests/integration/kafka_real_broker_README.md Sets up the Kafka test environment using Docker. This command provisions the necessary Docker containers for the Kafka broker and related services. ```bash cargo +nightly -Zscript scripts/provision_kafka_test_env.rs --setup-docker ``` -------------------------------- ### Hardened Real Integration Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/e2e_hardening_consolidation.md Demonstrates proper runtime integration using asupersync's Mutex, RwLock, and LabRuntime for deterministic testing with real budgets and runtime state. ```rust use crate::cx::Cx; use crate::sync::{Mutex, RwLock}; use crate::types::{Budget, RegionId, TaskId, Time}; use crate::runtime::RuntimeState; use crate::lab::LabRuntime; #[test] fn test_hardened_real_integration_example() { let lab = LabRuntime::new(); // ✅ Deterministic testing let budget = Budget::new(Time::from_secs(10)); // ✅ Real budget lab.block_on(budget, async |cx: &Cx| { let state = RwLock::new(RuntimeState::new()); // ✅ Real runtime state // ✅ Real region creation using runtime APIs let region_id = { let mut state_guard = state.write().await; state_guard.create_region(cx, None) .expect("Failed to create region") }; Ok(()) }).expect("Test failed"); } ``` -------------------------------- ### Install Beta Release for Testers Source: https://github.com/dicklesworthstone/asupersync/blob/main/examples/atp_j5_cli_examples.md Allow beta testers to install a specific beta release. This command allows overwriting existing installations with the --force flag. ```bash atp release install \ --release-id "asupersync" \ --version "$VERSION" \ --dest /opt/asupersync-beta \ --force \ --verify ``` -------------------------------- ### Starting a GenServer with a Name Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/otp_comparison.md Migrates from OTP's gen_server:start_link to Spork's SupervisorBuilder for child process management. ```Rust SupervisorBuilder::new("name").child(ChildSpec::new("name", start_fn)) ``` -------------------------------- ### Validate Rust Browser Consumer Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/WASM.md Validate the maintained browser-facing Rust example that the repository actually proves end-to-end. This script ensures the consumer example is working correctly. ```bash PATH=/usr/bin:$PATH bash scripts/validate_rust_browser_consumer.sh ``` -------------------------------- ### PostgreSQL Connection Setup: sqlx vs Asupersync Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_db_messaging_migration_packs_contract.md Compares connection setup for PostgreSQL between sqlx and Asupersync. Asupersync requires a `Cx` capability and uses `Outcome` for error handling. ```rust Before (`sqlx`) `PgPoolOptions::new().connect(url).await?` `PgConnectOptions::from_str(url)?` ``` ```rust After (Asupersync) `PgConnection::connect(&cx, url).resolved()?` `PgConnectOptions::parse(url)?` ``` -------------------------------- ### Rust Process Bootstrap with RuntimeBuilder Source: https://github.com/dicklesworthstone/asupersync/blob/main/skills/asupersync-mega-skill/references/NATIVE-GREENFIELD.md This snippet demonstrates the basic process bootstrap for a native Asupersync application using `RuntimeBuilder`. It sets up the runtime on the current thread and prepares for asynchronous operations. ```rust use asupersync::runtime::RuntimeBuilder; fn main() -> Result<(), asupersync::Error> { let rt = RuntimeBuilder::current_thread().build()?; rt.block_on(async { // prefer runtime-managed contexts in production, // use Cx::for_request() only as a convenience seam }); Ok(()) } ``` -------------------------------- ### Install FrankenLab Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/adoption/getting_started.md Install FrankenLab using cargo. Ensure the CARGO_TARGET_DIR is set for the target directory. ```bash rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_adoption_getting_started_docs cargo install --path frankenlab ``` -------------------------------- ### NATS Connection: Before vs After Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/tokio_t6_migration_packs.md Shows how to establish a connection to a NATS server, with and without options/configuration, comparing async-nats and Asupersync. ```rust let client = async_nats::connect("nats://localhost:4222").await?; // Or with options: let client = async_nats::ConnectOptions::new() .user_and_password("user".into(), "pass".into()) .connect("nats://localhost:4222").await?; ``` ```rust let mut client = NatsClient::connect(&cx, "nats://localhost:4222").await?; // Or with config: let config = NatsConfig::from_url("nats://user:pass@localhost:4222")?; let mut client = NatsClient::connect_with_config(&cx, config).await?; ``` -------------------------------- ### Proof Runner Block Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/proof_runner_usage.md Example output when the proof runner is blocked by an external factor. ```text Completed. blocked-external: intended all-targets-check stopped at audit/semaphore.rs:37 (clippy_lint_wall) while touching src/channel/mpsc.rs; supplemental proof lib-tests passed. ``` -------------------------------- ### Install cargo-fuzz Source: https://github.com/dicklesworthstone/asupersync/blob/main/fuzz/README.md Installs cargo-fuzz, which requires a nightly Rust toolchain. This is a prerequisite for running fuzz targets. ```bash rustup install nightly cargo +nightly install cargo-fuzz ``` -------------------------------- ### Start Agent Session Macro Source: https://github.com/dicklesworthstone/asupersync/blob/main/AGENTS.md Use macros for common agent coordination workflows like starting a session. ```rust macro_start_session ``` -------------------------------- ### CancelRequest Message Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/asupersync_plan_v4.md Example of a CancelRequest message to stop a remote computation. Includes task ID and reason. ```json { "remote_task_id": 42, "reason": "Timeout", "origin_node": "node-a" } ``` -------------------------------- ### Start Standalone gRPC Connect Server Source: https://github.com/dicklesworthstone/asupersync/blob/main/tests/conformance/grpc_connect/README.md Starts the test server with specified port, enabling compression and Connect protocol. ```bash rch exec -- env CARGO_TARGET_DIR=${TMPDIR:-/tmp}/rch_target_grpc_connect_conformance cargo run --manifest-path tests/conformance/grpc_connect/Cargo.toml --bin grpc-connect-server -- --port 8080 --enable-compression --connect-protocol ``` -------------------------------- ### Bincode Migration Example Source: https://github.com/dicklesworthstone/asupersync/blob/main/docs/plans/upgrade_log.md Shows the migration from `bincode::serialize` to `bincode::serde::encode_to_vec` and `bincode::deserialize` to `bincode::serde::decode_from_slice` for using the legacy configuration. ```Rust bincode::serialize -> bincode::serde::encode_to_vec(..., bincode::config::legacy()) bincode::deserialize -> bincode::serde::decode_from_slice(..., bincode::config::legacy()) ```