Skip to content

feat: Add WASI Preview 2 support and enhanced target coverage #3507

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avrabe
Copy link

@avrabe avrabe commented Jul 16, 2025

Summary

This PR implements comprehensive WASI Preview 2 support for rules_rust, addressing the feature request in #3502.

Changes

  • Platform Support: Add WASI version constraint settings and platform configurations for wasip2
  • Target Triples: Add support for wasm32-wasip2 and wasm32-wasip1-threads targets
  • Toolchain Fixes: Resolve cross-compilation issues by including C++ toolchain files as action inputs
  • Allocator Library: Fix WASI builds by using empty sources and removing stdint.h dependency
  • Testing: Add comprehensive unit tests for new WASI platform functionality

Closes #3502

Additional Notes

This implementation provides forward compatibility with the evolving WASI ecosystem while maintaining backward compatibility with existing wasip1 targets.

@avrabe avrabe force-pushed the wasi-p2-support-pr branch 5 times, most recently from 0152ded to d68b726 Compare July 16, 2025 18:22
- Add WASI version constraint settings and platform configurations for wasip2
- Add support for wasm32-wasip2 and wasm32-wasip1-threads targets
- Fix WASI toolchain and allocator library issues for cross-compilation
- Add comprehensive unit tests and documentation for WASI platform functionality
@avrabe avrabe force-pushed the wasi-p2-support-pr branch from d68b726 to 7249b22 Compare July 16, 2025 18:49
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.

Add support for WASI Preview 2 and 3 platform selection
1 participant