Skip to content
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

WASM build #1306

Closed
eitsupi opened this issue Dec 21, 2024 · 3 comments
Closed

WASM build #1306

eitsupi opened this issue Dec 21, 2024 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@eitsupi
Copy link
Collaborator

eitsupi commented Dec 21, 2024

Unlike extendr, savvy can be built for webR, so the next branch should be able to do the same thing as pola-rs/polars#20383.
In fact, R-universe CI successfully building for webR until I incorporated the parquet feature of polars (although it didn't seem to work due to what appeared to be threading issues).
It seems that savvy does not require the new LLVM, unlike pyo3.

cc @georgestagg

@eitsupi eitsupi added the enhancement New feature or request label Dec 21, 2024
@eitsupi eitsupi added this to the Rewrite milestone Dec 21, 2024
@georgestagg
Copy link

Note that in pola-rs/polars#20383 we also disable the parquet feature for the Pyodide build, along with some other Rust features that cause issues right now. I expect this can be improved in time except for the cloud related features, which might be difficult to get working in the Wasm sandbox.

Re: threading, the thread pool should be limited to a single thread when running under Emscripten now (set here), but there may still be some configuration tweaks along these lines required to compile for webR. It is important in webR not to compile/link with -pthreads at all.

@eitsupi
Copy link
Collaborator Author

eitsupi commented Dec 31, 2024

Thanks George, the test build on R-universe (from eitsupi/neo-r-polars#50) seems working.

> install.packages("rlang")
Downloading webR package: rlang
> install.packages("neopolars", repos = "https://eitsupi.r-universe.dev")
Downloading webR package: neopolars
> library(neopolars)
> as_polars_df(mtcars)$select("cyl", "am")
shape: (32, 2)
┌─────┬─────┐
│ cylam  │
│ ------ │
│ f64f64 │
╞═════╪═════╡
│ 6.01.0 │
│ 6.01.0 │
│ 4.01.0 │
│ 6.00.0 │
│ 8.00.0 │
│ …   ┆ …   │
│ 4.01.0 │
│ 8.01.0 │
│ 6.01.0 │
│ 8.01.0 │
│ 4.01.0 │
└─────┴─────┘

@eitsupi
Copy link
Collaborator Author

eitsupi commented Jan 11, 2025

Done by b900d63

@eitsupi eitsupi closed this as completed Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants