-
Notifications
You must be signed in to change notification settings - Fork 804
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
error: #[ctor] is not supported on the current target
when compiling for wasm32-unknown-emscripten
#2517
Comments
wasm32-unknown-emscripten
error: #[ctor] is not supported on the current target
when compiling for wasm32-unknown-emscripten
I wonder if it's possible to get rid of multiple |
When compiling from this commit, this (log1.txt) is the output log from
So for example several of the errors come from here: https://github.com/kylebarron/polars/blob/3e52839c89367e8fb676c483f6c618a83f0460f9/py-polars/src/series.rs#L31-L61
I'm not sure I understand pyo3 well enough to answer this question 😅 (I also didn't write the polars python bindings; I'm just exploring compiling them to pyodide). It seems like there's a compile error every time |
Only |
Oh I see! That makes sense now! It looks like polars uses multiple pymethods to simplify their macros (they use Thanks for your help! |
As this is documented and not anything PyO3 can realistically change, I will close this issue. |
UPDATE: |
👋 I'm trying to compile polars to wasm to work with pyodide (ref #2412 and pola-rs/polars#3672 (comment)).
After removing some dependencies, I got all of
polars
's dependencies to build forwasm32-unknown-emscripten
usingRUSTUP_TOOLCHAIN=nightly maturin build --release -o dist --target wasm32-unknown-emscripten -i python3.10
, but compilation failed on polars itself with a couple hundred#[ctor] is not supported on the current target
errors:I've seen mmastrac/rust-ctor#14 and #1434. Does this mean there's no way to use a pyo3 class in
wasm32-unknown-emscripten
? Did the opt-out functionality mentioned here ever get implemented?The text was updated successfully, but these errors were encountered: