fix(issuer): cfg(unix)-gate dstack-kms so the wasm32 build compiles#26
Merged
Conversation
The new dstack-kms client uses `std::os::unix::net::UnixStream`, which doesn't exist on `wasm32` — and `tessera-wasm` transitively compiles `tessera-issuer`, so PR #25 broke the `wasm browser client` CI job (and landed on main: my merge command's piped `gh pr checks` masked the failing exit code). Gate the Unix-only module behind `#[cfg(unix)]`; the `KeyProviderConfig::DstackKms` variant still parses everywhere (portable config validation), but preflight/establish fail closed with a clear "requires a Unix platform" error on non-Unix targets. Verified: `tessera-wasm` now builds for wasm32-unknown-unknown; the Unix path is unchanged (35 issuer tests green, clippy clean).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PR #25's new
dstack-kmsclient usesstd::os::unix::net::UnixStream, which doesnot exist on
wasm32.tessera-wasmtransitively compilestessera-issuer, so thewasm browser clientCI job broke — and it reachedmainbecause my #25 mergecommand's piped
gh pr checks | sort | headmasked the failing exit code. My fault;this restores
mainto green.Fix
#[cfg(unix)]-gate the Unix-onlydstack_kmsmodule. TheKeyProviderConfig::DstackKmsvariant still parses on every platform (portableconfig validation), but
preflight/establishfail closed with a clear "requires aUnix platform" error on non-Unix targets.
Verified locally
cargo build --manifest-path crates/tessera-wasm/Cargo.toml --target wasm32-unknown-unknownnow compiles (waserror[E0433]: cannot find unix in os).-D warningsclean, fmt clean.Docs/behavior on Unix (the only supported deploy target) are unchanged.