-
Notifications
You must be signed in to change notification settings - Fork 0
feat: AOT embedding, parallel processing, and quality improvements #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+4,996
−924
Conversation
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
- Fix TinyGo flag format: --wit-package/-world → -wit-package/-world - Pass full WIT directory with deps/ structure for dependency resolution - Add missing WASI imports required by TinyGo runtime (random, environment, monotonic-clock) - Add WASI 0.2.0 dependencies: filesystem, sockets, random - Fix calculator_with_bindings.go type mismatches and missing cm import - Re-enable Go calculator components in CI (Linux & macOS) - Document TinyGo WASI runtime requirement in README - Enhance wit_structure tool for transitive deps copying Fixes #80, #82
…se quality - Implement full AOT embedding with custom WASM sections and LEB128 encoding - Add true parallel processing using futures::stream for 10x concurrency - Fix architecture violation: move mock services from test/ to examples/ - Remove hardcoded /tmp paths for cross-platform compatibility - Add comprehensive docstrings to 29 core rule functions
…mponents - Fix checksum_updater_lib -> checksum_updater in test imports - Exclude Go calculator components from CI (TinyGo export issues, #80) - Keep working Go components: http_service, simple_wasi, multi_file_test
…ports - Fix final crate name: checksum_updater_lib -> checksum_updater (line 227) - Re-enable calculator_with_bindings (uses generated WIT bindings - works!) - Keep exclusions only for manual export components (need migration) - Root cause: Manual //export directives don't work with Component Model - Solution: Use wit-bindgen-go generated bindings (like calculator_with_bindings)
…components Tests depending on calculator_component pull it in via //test/go/... Exclude these specific tests: - test_calculator_component_provides_info - test_calculator_component_valid_wasm - test_calculator_exports_verification - test_debug_component_provides_info - test_debug_component_valid_wasm - test_release_vs_debug_profiles Working tests (http_service, simple_test) remain enabled.
…a tests Tested locally with clean build - actual results: ✅ PASSING (7 tests): - test_calculator_component_provides_info (metadata only) - test_calculator_exports_verification (metadata only) - test_debug_component_provides_info (metadata only) - test_http_service_component_provides_info - test_release_vs_debug_profiles - test_simple_test_component_provides_info - test_tinygo_toolchain_integration ❌ FAILING (3 tests - now excluded): - test_calculator_component_valid_wasm (calculator_component build fails) - test_debug_component_valid_wasm (calculator_component_debug build fails) - test_http_service_exports_verification (test world name issue) Metadata-only tests work because they don't build the component!
Fixes all 3 failing Go component tests by migrating from manual //go:wasmexport directives to wit-bindgen-go generated bindings. Manual exports have type limitations (core WASM types only, single return values) that are incompatible with Component Model canonical ABI. Changes: - Created calculator_bindings.go and http_service_bindings.go - Added WASI imports to http-service.wit for TinyGo runtime - Updated CI to remove test exclusions - All 11 Go component tests now pass
- Add go.sum for github.com/google/uuid and golang.org/x/sync deps - Add WASI imports to analytics_service.wit for TinyGo runtime - Add all Cargo.toml deps to checksum_updater_wasm BUILD.bazel Note: analytics_service still needs wit-bindgen-go migration Note: checksum_updater_wasm cannot build due to tokio/reqwest WASM limitations
…test in CI - Migrated analytics_service to wit-bindgen-go bindings - Created simplified analytics_service_bindings.go implementation - Removed tokio/reqwest/futures deps from checksum_updater_wasm (not used) - Removed ssh_keygen_test exclusion (working, runtime acceptable) - Only calculator_simple remains excluded (intentional educational example) All exclusions resolved except intentional educational example.
- wasm-tools: 1.235.0 → 1.240.0 - wasmtime: 35.0.0 → 37.0.2 - wkg: 0.11.0 → 0.12.0 - Go SDK: 1.25.0 → 1.25.2 - Rust toolchain: 1.88.0 → 1.90.0 - wasm-encoder/wasmparser: 0.220 → 0.239 Updated checksums in: - checksums/registry.bzl - checksums/tools/*.json - toolchains/wkg_toolchain.bzl
Upgraded dependencies based on dependabot PRs: **Core Dependencies:** - anyhow: 1.0.99 → 1.0.100 - clap: 4.5.47 → 4.5.48 (and 4.0 → 4.5 for wasm_embed_aot) - tempfile: 3.22.0 → 3.23.0 - serde: 1.0.223 → 1.0.228 - regex: 1.11.2 → 1.11.3 - chrono: 0.4.41 → 0.4.42 **WebAssembly Tooling:** - wasm-encoder: 0.237/0.239 → 0.240 - wasmparser: 0.237/0.239 → 0.240 - wit-parser: 0.237/0.239 → 0.240 - wit-component: 0.239 → 0.240 - wat: 1.239 → 1.240 **Other:** - octocrab: 0.45 → 0.46 **Modified Tools:** - tools/checksum_updater - tools/ssh_keygen - tools/wasm_embed_aot - tools/wizer_initializer - tools-builder/toolchains All builds verified successful.
The calculator_reactor target was using manual //export directives which are incompatible with Component Model. Updated to use wit-bindgen-go generated bindings like calculator_component and calculator_component_debug. This fixes the CI failure on ubuntu-latest where wasm-tools component new was failing to find the proper exports.
The rust_binary target was missing several dependencies that are used in src/main.rs: - anyhow - chrono - hex - regex - semver - serde - sha2 This caused compilation failures in CI. The rust_wasm_component target already had all these deps.
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.
Summary
This PR implements several production-critical features and quality improvements identified during the codebase audit:
✨ New Features
1. AOT Embedding Implementation (
tools/wasm_embed_aot
)embed_artifacts()
,extract_artifact()
,list_artifacts()
,verify_integrity()
2. Parallel Processing (
tools/checksum_updater
)futures::stream::buffer_unordered(10)
&mut self
to&self
)🏗️ Architecture Improvements
3. Test Dependency Fix
examples/wac_oci_composition/mock_services/
directory//test/integration
to proper location4. Cross-Platform Compatibility
/tmp/
paths from 5 files📚 Documentation
5. Comprehensive Docstrings
rust_wasm_component.bzl
,cpp/defs.bzl
,go/defs.bzl
,js/defs.bzl
,wac_compose.bzl
,wasm_precompile.bzl
, and more🐛 Bug Fixes
wkg_lock
test missing mandatorypackage_name
attributeTest Plan
Impact
Files Changed
33 files changed, 3,405 insertions(+), 116 deletions(-)
examples/wac_oci_composition/mock_services/
(5 files)