You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: eliminate OpenSSH dependency with hermetic WebAssembly component
Replace external @openssh dependency with a hermetic ssh-keygen WebAssembly
component, addressing issue #19 where outdated busybox packages caused CI
failures. This implementation demonstrates the "eat your own dogfood"
philosophy by using our own WebAssembly Component Model technology.
## Implementation Details
### Hermetic SSH Key Generation Tool
- Built with Rust ssh-key crate for cryptographic operations
- Supports Ed25519, RSA, and ECDSA key generation
- Full OpenSSH format compatibility for seamless integration
- Command-line interface matching ssh-keygen essentials
### WebAssembly Component Architecture
- Proper WASI Preview 2 component exporting wasi:cli/[email protected]
- Executable via Wasmtime runtime with zero external dependencies
- Cross-platform hermetic execution without system tool requirements
### New rust_wasm_binary Rule
- Addresses design limitation in rust_wasm_component for CLI applications
- Builds proper CLI components with correct WASI interface exports
- Documented in both language guide and rule reference
### Enhanced ssh_keygen.bzl Rule
- Updated to use Wasmtime toolchain for component execution
- Proper argument passing with --argv0 and --dir flags
- Maintains full OpenSSH format compatibility for existing workflows
## Breaking Changes Resolved
### Dependency Cleanup
- Removed @openssh bazel_dep from MODULE.bazel
- Removed rules_coreutils override (no longer needed)
- Eliminated CI target exclusions for OpenSSH-dependent builds
### Additional Improvements
- Added WASI NN interface support for neural network components
- Enhanced C++ component toolchain with better error handling
- Improved WIT dependency management for WASI interfaces
## Testing and Validation
- Native binary passes all clap argument parsing tests
- WebAssembly component executes correctly via Wasmtime
- Generated keys verified in proper OpenSSH format
- OCI publishing with OpenSSH signing builds successfully
- All previously excluded CI targets now build without issues
This change eliminates external system dependencies while demonstrating
practical WebAssembly Component Model usage for traditional tooling needs.
The hermetic approach ensures consistent builds across all platforms and
environments.
0 commit comments