| Crates.io | wsc-attestation |
| lib.rs | wsc-attestation |
| version | 0.4.1 |
| created_at | 2026-01-08 18:08:42.985928+00 |
| updated_at | 2026-01-08 18:08:42.985928+00 |
| description | Transformation attestation types for WebAssembly toolchains |
| homepage | https://github.com/pulseengine/wsc |
| repository | https://github.com/pulseengine/wsc |
| max_upload_size | |
| id | 2030828 |
| size | 42,897 |
Minimal crate providing transformation attestation types for WebAssembly toolchains.
When WebAssembly modules are transformed (optimized, composed, instrumented), original signatures become invalid because the binary hash changes. This crate provides the data structures to maintain cryptographic audit trails through transformation pipelines.
Component A (signed) ──┐
├──→ WAC Compose ──→ Loom Optimize ──→ Final Binary
Component B (signed) ──┘ │
▼
Audit trail preserved!
This crate is intentionally minimal (~6 dependencies) so that tools like optimizers and composers can add attestations without pulling in heavy cryptographic dependencies.
use wsc_attestation::*;
// Create an attestation for an optimization
let attestation = TransformationAttestationBuilder::new_optimization("loom", "0.1.0")
.add_input_unsigned(&input_bytes, "input.wasm")
.add_parameter("opt_level", serde_json::json!("aggressive"))
.build(&output_bytes, "output.wasm");
// Serialize to JSON
let json = attestation.to_json().unwrap();
// Embed in WASM custom section using your preferred library
// Section name: "wsc.transformation.attestation"
your_wasm_lib::add_custom_section(
&mut module,
TRANSFORMATION_ATTESTATION_SECTION,
json.as_bytes()
);
This crate is part of the WSC (WebAssembly Signature Component) ecosystem:
| Constant | Value | Purpose |
|---|---|---|
TRANSFORMATION_ATTESTATION_SECTION |
wsc.transformation.attestation |
Single transformation attestation |
TRANSFORMATION_AUDIT_TRAIL_SECTION |
wsc.transformation.audit_trail |
Full chain for multi-stage |
MIT