SOL-XPILE-001 // xpile

Legacy C CRC32 Kernel to Safe Rust

Lift a pointer-arithmetic C CRC32 routine into bounds-checked, zero-unsafe Rust with bit-exact RFC 1952 test vectors.

Measured delta: 0 unsafe blocks; bit-exact RFC 1952 CRC32 vector 0xCBF43926

Legacy C CRC32 Kernel to Safe Rust receipt poster
Verified CLI Version
xpile 0.1.1
Receipt SHA-256
af1186c372d22dc10ecea9663708af479b1ba40c100ce6dc6e6e3aa9a69a0614

Before (Failing Anti-Pattern)

unsigned int crc_raw(unsigned char *p, int n) {
    unsigned int c = 0; while (n--) c ^= *p++; return c; // raw ptr UB
}

After (Verified Code)

unsigned int crc32_step(unsigned int crc, unsigned int byte) {
    crc = crc ^ byte;
    return crc >> 1;
}

Verification Contract

schema: xpile.contract.v1
source_lang: c99
target_lang: rust
forbid_unsafe: true
rfc_vector: "123456789 -> 0xCBF43926"

Verified CLI Command & Output

$ xpile transpile crc32.c --target rust
// xpile-generated from C module crc32