-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add feature flags to the python distribution to remove async APIs and tokio code. - minimal pyodide docs - Add CI test that we can build in pyodide - Update pyo3-arrow to 0.2 
- Loading branch information
1 parent
d00dfde
commit e09f4af
Showing
26 changed files
with
365 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
emsdk | ||
vcpkg | ||
vcpkg_installed | ||
.pyodide* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
emsdk/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## Pyodide | ||
|
||
|
||
Install rust nightly and add wasm toolchain | ||
|
||
``` | ||
rustup toolchain install nightly | ||
rustup target add --toolchain nightly wasm32-unknown-emscripten | ||
``` | ||
|
||
Install dependencies. You need to set the `pyodide-build` version to the same version as the `pyodide` release you distribute for. | ||
|
||
``` | ||
pip install -U maturin | ||
pip install pyodide-build | ||
``` | ||
|
||
Install emsdk. | ||
|
||
``` | ||
git clone https://github.com/emscripten-core/emsdk.git | ||
cd emsdk | ||
PYODIDE_EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) | ||
./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION} | ||
./emsdk activate ${PYODIDE_EMSCRIPTEN_VERSION} | ||
source emsdk_env.sh | ||
cd .. | ||
``` | ||
|
||
- The `RUSTFLAGS` is temporary to get around this compiler bug. | ||
- You must use rust nightly | ||
- You must use `--no-default-features` to remove any async support. `tokio` does not compile for emscripten. | ||
|
||
```bash | ||
RUSTFLAGS='-Zinline-mir=no' / | ||
RUSTUP_TOOLCHAIN=nightly / | ||
maturin build / | ||
--no-default-features / | ||
--release / | ||
-o dist / | ||
--target wasm32-unknown-emscripten | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
pub mod geo; | ||
pub mod native; | ||
|
||
#[cfg(feature = "libc")] | ||
pub mod polylabel; |
Oops, something went wrong.