Skip to content

fix(rust): Make tokio optional to allow wasm builds#26484

Closed
eitsupi wants to merge 3 commits intopola-rs:mainfrom
eitsupi:fix-async-feature
Closed

fix(rust): Make tokio optional to allow wasm builds#26484
eitsupi wants to merge 3 commits intopola-rs:mainfrom
eitsupi:fix-async-feature

Conversation

@eitsupi
Copy link
Contributor

@eitsupi eitsupi commented Feb 8, 2026

#26353 introduce tokio as a default dependency, which make building polars for wasm impossible.
Found in pola-rs/r-polars#1726

@github-actions github-actions bot added fix Bug fix rust Related to Rust Polars labels Feb 8, 2026
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.07%. Comparing base (1fdbd1f) to head (0ec91c6).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-lazy/src/scan/csv.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #26484   +/-   ##
=======================================
  Coverage   81.07%   81.07%           
=======================================
  Files        1783     1783           
  Lines      243288   243288           
  Branches     3074     3074           
=======================================
+ Hits       197236   197247   +11     
+ Misses      45249    45238   -11     
  Partials      803      803           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eitsupi
Copy link
Contributor Author

eitsupi commented Feb 8, 2026

The failing test seems unrelated.

@ritchie46
Copy link
Member

I am not sure we want to. We move more and more to a model where tokio is required. I don't see the benefit of going through all those hoops. Why do we want it on the r-polars side?

@eitsupi
Copy link
Contributor Author

eitsupi commented Feb 8, 2026

It just causes the wasm build to fail. Of course, this would be unnecessary if polars never plans to support wasm in the future, and I'm not going to argue with that.

@agriyakhetarpal
Copy link

This will be helpful for my above-linked PR (#24058), which is nearing completion now and passing a significant portion of the test suite (albeit locally, not in CI right now). It would be great if WASM support could be brought back and kept, considering both the R bindings and Pyodide would need it.

@georgestagg
Copy link
Contributor

georgestagg commented Feb 9, 2026

It's worth noting that tokio does have some limited wasm support: https://docs.rs/tokio/latest/tokio/#wasm-support.

If Polars increasingly moves towards a tokio model that might be a way forward. Though I don't know if Polars currently depends on any of the tokio features not supported in Wasm.

@orlp
Copy link
Member

orlp commented Feb 10, 2026

I would much rather welcome a PR that tries to use (unstable) tokio WASM support than us adding branches/unimplemented()s everywhere to try and compile without it.

@eitsupi
Copy link
Contributor Author

eitsupi commented Feb 11, 2026

Okay, I don't have the bandwidth to put that much effort into making Polars WASM-compatible, so feel free to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants