Home / Market / rust migration

rust migration

Plan, implement, or audit a port to Rust. Compare behavior with the original and verify compatibility, shipped artifacts, performance, and rollback.

skill★ 507810 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: rust-migration description: "Plan, implement, or audit a port to Rust. Compare behavior with the original and verify compatibility, shipped artifacts, performance, and rollback." category: development risk: critical source: self source_type: self date_added: "2026-11-30" author: ShianMike tags: [rust, migration, compatibility, testing]

---

Rust Migration

When to Use

Prerequisites

Identify the original revision, current callers, supported environments, and the reason for the port. For execution, use the project's documented build and test entry points, toolchains, fixtures, and an authorized local checkout. For static assessment, record which behavior remains unverified when the baseline cannot run.

Migration Workflow

Capture the compatibility contract

  1. Pin the original revision and record its build, invocation, dependencies, and relevant configuration. Run the existing tests and capture outputs from representative inputs through the public entry point. Start with checked-in, synthetic, or approved redacted fixtures.
  2. Record what callers observe, including results, error types or exit codes, ordering, encodings, and side effects. Check known production edge cases and old data formats. List intended behavior changes with their expected outcomes so the differential test can distinguish them from regressions.
  3. Define success against the reason for moving. If performance drives the work, profile the current application before picking a boundary and agree on the workload and metric. If supportability or safety drives it, identify the dependency or invariant that must change.

Port one boundary at a time

Check behavior and the shipped artifact

Verify cutover and rollback when applicable

Audit Handoff

Identify the exact original and Rust revisions and artifacts checked. For each finding, give the affected entry point, a reproduction, expected and observed behavior, and its impact on callers. Include the smallest corrective step and the evidence needed to verify it. State the platforms, inputs, and behaviors still awaiting verification.

Example

> Port the timestamp bucketing helper to Rust and preserve the signed timestamp behavior.

Use the original implementation to generate a fixture for zero, negative timestamps, bucket boundaries, and integer limits. The example catches a direct translation that compiles but moves pre-epoch timestamps into the wrong bucket. Run the differential test.

Limitations

Safety and Side Effects

Audit through inspection and authorized tests in an isolated checkout. Apply source changes only within the requested implementation scope. Builds can execute project code through build scripts, macros, or test hooks and can download dependencies. Inspect those entry points before building unfamiliar code. Use approved fixtures locally and obtain authorization for production traffic, data writes, publishing, or cutover.

Related Skills and Documentation