How to cross-compiling wasm32-unknown-unknown on ubuntu #2306
-
Bug DescriptionI imported the pyo3 library into the substrate code(substrate is a framework for building blockchains), however the code cannot be compiled, the error reports under Windows system are as follows:
So I searched for the solution and I found this issue:https://github.com/PyO3/pyo3/issues/1221 I guess the answer is as @davidhewitt said in issue: I should disable check_target_architecture when cross-compiling. But I do not know how to achieve it. Steps to Reproduce
BacktraceNo response Your operating system and versionlinux ubuntu 20.04.3 Your Python version (
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Please see #1522 (comment) - you need make sure you are targeting wasm in your Rust build and also have built your own wasm Python interpreter (I'm not aware of any wasm distributions of Python). It sounds like Python 3.11 is the first Python release that might support building for wasm. Certainly this is something you're free to try but is out of scope for PyO3 for now. |
Beta Was this translation helpful? Give feedback.
Please see #1522 (comment) - you need make sure you are targeting wasm in your Rust build and also have built your own wasm Python interpreter (I'm not aware of any wasm distributions of Python). It sounds like Python 3.11 is the first Python release that might support building for wasm.
Certainly this is something you're free to try but is out of scope for PyO3 for now.