Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,8 @@ jobs:
with:
components: clippy, rustfmt
toolchain: stable

- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: nightly
targets: wasm32-wasip2

- name: Default to stable rust
run: rustup default stable

- name: Cache
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ more information [on our website](https://www.influxdata.com/legal/cla/).
## Required Software

### Rust
Install the `stable` [Rust] toolchain. The easiest way to do this is [rustup]. You also need the `nightly` toolchain for the `wasm32-wasip2` target. This can easily be done via (**note that this installs a NIGHTLY toolchain!**):
Install the `stable` [Rust] toolchain. The easiest way to do this is [rustup]. You also the `wasm32-wasip2` target. This can easily be done via:

```console
rustup toolchain install nightly --target=wasm32-wasip2
rustup target add wasm32-wasip2
```

### Yamllint
Expand Down Expand Up @@ -74,10 +74,10 @@ error[E0463]: can't find crate for `core`
= help: consider building the standard library from source with `cargo build -Zbuild-std`
```

Then go back to ["Required Software > Rust"](#rust) and install the correct NIGHTLY toolchain. Note that the hint in the error message is wrong / incomplete. The correct way of installing the target for the nightly toolchain is -- which should NOT be required if you read & execute what is written in ["Required Software > Rust"](#rust):
You should probably have followed ["Required Software > Rust"](#rust), but the compiler also tells you what to do:

```console
rustup target add wasm32-wasip2 --toolchain=nightly
rustup target add wasm32-wasip2
```

### Python Fails To Start / No module named `encodings`
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ private_intra_doc_links = "deny"
datafusion-common = { git = "https://github.com/influxdata/arrow-datafusion.git", rev = "8347a71f62d4fef8d37548f22b93877170039357" }
datafusion-expr = { git = "https://github.com/influxdata/arrow-datafusion.git", rev = "8347a71f62d4fef8d37548f22b93877170039357" }

# patches to get wasi p2 to run without extra feature flags
# See <https://github.com/rust-lang/rust/issues/130323>.
pyo3 = { git = "https://github.com/crepererum/pyo3.git", rev = "adeb7e52822e0d0e7fe7234e466cd95126ad70b0" }
# This is version 0.26.0 with https://github.com/PyO3/pyo3/pull/5368 backported.
pyo3 = { git = "https://github.com/crepererum/pyo3.git", rev = "2a9f7e5b3d3203f3dc517c42352946bb6f352551" }

# faster tests
[profile.dev.package]
Expand Down
3 changes: 0 additions & 3 deletions guests/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ datafusion-expr.workspace = true
datafusion-udf-wasm-guest.workspace = true
pyo3.workspace = true

[target.'cfg(all(target_os = "wasi", target_env = "p2"))'.dependencies]
pyo3 = { workspace = true, features = ["nightly"] }

[build-dependencies]
tar.workspace = true
walkdir = "2.5.0"
2 changes: 1 addition & 1 deletion guests/python/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ download-wasi-sdk:
[private]
build-lib profile: download-python-sdk download-wasi-sdk
@echo ::group::guests::python::build-lib {{profile}}
cargo +nightly build --target=wasm32-wasip2 --profile={{replace(profile, "debug", "dev")}}
cargo build --target=wasm32-wasip2 --profile={{replace(profile, "debug", "dev")}}
@echo ::endgroup::

# top-level entry point
Expand Down
2 changes: 1 addition & 1 deletion guests/rust/Justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[private]
build-add-one profile:
@echo ::group::guests::rust::build-add-one {{profile}}
cargo +nightly build --target=wasm32-wasip2 --example=add_one --profile={{replace(profile, "debug", "dev")}}
cargo build --target=wasm32-wasip2 --example=add_one --profile={{replace(profile, "debug", "dev")}}
@echo ::endgroup::

# build `add-one` example in debug mode
Expand Down
4 changes: 2 additions & 2 deletions guests/rust/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Rust Guest

## Build
Until <https://github.com/rust-lang/rust/issues/130323> is resolved, building the guest requires a nightly Rust toolchain with the `wasm32-wasi` target installed:
Building the guest requires the `wasm32-wasi` target to be installed:

```console
rustup toolchain install nightly --target=wasm32-wasip2
rustup target add wasm32-wasip2
```

Then build with:
Expand Down