Skip to content

Build the Rust workspace and Wasm artifacts - #10

Draft
keys-i wants to merge 1 commit into
docsfrom
rust
Draft

Build the Rust workspace and Wasm artifacts#10
keys-i wants to merge 1 commit into
docsfrom
rust

Conversation

@keys-i

@keys-i keys-i commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Motivation

The existing package graph verifies source identities but ships metadata only. This change turns those boundaries into buildable Rust crates and checked-in WebAssembly outputs.

Closes #9

Changes

  • replace the Node metadata workspace with four Rust crates: krad-clang, krad-musl, krad-libs, and krad-utils
  • verify exact local Cheerp sources, revisions, licenses, and the pinned compiler archive SHA-256 without downloading inputs
  • build no_std Rust Wasm libraries and compile a real C++ fixture through Cheerp
  • check in the five generated .wasm/ES-module artifacts and document exact limits
  • cover ABI helpers plus CLI help, invalid command, and missing-input failures

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (7 tests)
  • cargo run -p krad-utils -- build ../research dist
  • Node: Cheerp krad_add(20, 22) == 42; Rust Wasm exports returned expected values
  • file dist/*: four WebAssembly MVP modules
  • two builds produced identical SHA-256 hashes

Risks

The build trusts only the exact pinned local source checkouts and SHA-verified Cheerp archive. It does not provide a complete libc/sysroot, in-browser compiler, Linux/BSD distribution, or measured advantage over Cheerp. The commit is unsigned at the user request because the configured SSH signing key was locked.

Rollback

Revert commit 46ebcb7af1384f03e720209d4ea064229c2849ec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant