Skip to content

fix(rust): remove unsupported tokio io-std feature for WASM compatibility#17311

Merged
graphite-app[bot] merged 1 commit intomainfrom
fix-wasm-build-remove-io-std
Dec 23, 2025
Merged

fix(rust): remove unsupported tokio io-std feature for WASM compatibility#17311
graphite-app[bot] merged 1 commit intomainfrom
fix-wasm-build-remove-io-std

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Dec 23, 2025

Summary

Removes the io-std tokio feature from packages that don't require it to fix WASM build compatibility.

Context

The io-std feature is not supported on WASM targets, causing builds to fail with:

error: Only features sync,macros,io-util,rt,time are supported on wasm.

Changes

  • apps/oxfmt: Removed io-std from tokio features (not used)
  • apps/oxlint: Removed io-std from tokio features (not used)
  • crates/oxc_language_server:
    • Kept io-std in main dependencies (required for tokio::io::stdin()/stdout() for LSP communication)
    • Removed io-std from dev-dependencies (tests use DuplexStream)

Testing

  • All oxc_language_server tests pass (129 tests)
  • Builds successfully for native targets
  • Enables WASM builds to proceed

Copilot AI review requested due to automatic review settings December 23, 2025 13:29
@Boshen Boshen requested review from Sysix and camc314 as code owners December 23, 2025 13:29
@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter labels Dec 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the unsupported io-std tokio feature from packages that don't require it to enable WASM build compatibility. The io-std feature causes WASM builds to fail since it's not supported on WASM targets.

Key changes:

  • Removed io-std from tokio features in oxfmt and oxlint apps where it's not used
  • Removed io-std from tokio dev-dependencies in oxc_language_server where tests use DuplexStream instead of stdin/stdout
  • Kept io-std in oxc_language_server main dependencies where it's required for LSP communication

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
apps/oxfmt/Cargo.toml Removed io-std from tokio features as the package doesn't use stdin/stdout/stderr
apps/oxlint/Cargo.toml Removed io-std from tokio features as the package doesn't use stdin/stdout/stderr
crates/oxc_language_server/Cargo.toml Removed io-std from dev-dependencies as tests use DuplexStream instead of stdin/stdout

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Boshen Boshen changed the title fix: remove unsupported tokio io-std feature for WASM compatibility fix(rust): remove unsupported tokio io-std feature for WASM compatibility Dec 23, 2025
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 23, 2025
@github-actions github-actions bot added the C-bug Category - Bug label Dec 23, 2025
Copy link
Member Author

Boshen commented Dec 23, 2025

Merge activity

…lity (#17311)

## Summary

Removes the `io-std` tokio feature from packages that don't require it to fix WASM build compatibility.

## Context

The `io-std` feature is not supported on WASM targets, causing builds to fail with:
```
error: Only features sync,macros,io-util,rt,time are supported on wasm.
```

## Changes

- **apps/oxfmt**: Removed `io-std` from tokio features (not used)
- **apps/oxlint**: Removed `io-std` from tokio features (not used)
- **crates/oxc_language_server**:
  - Kept `io-std` in main dependencies (required for `tokio::io::stdin()`/`stdout()` for LSP communication)
  - Removed `io-std` from dev-dependencies (tests use `DuplexStream`)

## Testing

- All `oxc_language_server` tests pass (129 tests)
- Builds successfully for native targets
- Enables WASM builds to proceed
@graphite-app graphite-app bot force-pushed the fix-wasm-build-remove-io-std branch from c39d89a to c6690d1 Compare December 23, 2025 13:43
@graphite-app graphite-app bot merged commit c6690d1 into main Dec 23, 2025
19 checks passed
@graphite-app graphite-app bot deleted the fix-wasm-build-remove-io-std branch December 23, 2025 13:49
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants