Skip to content

Commit ea51991

Browse files
authored
Delete wasmtime.loader and wasmtime.bindgen (#310)
* Delete `wasmtime.loader` and `wasmtime.bindgen` This commit deletes two nice-to-have but difficult-to-maintain modules in this repository. Specifically: * The `wasmtime.loader` module is deleted as it was a proof-of-concept but doesn't map well to Python and Wasmtime. For example #302 shows how destruction of Python modules isn't handled correctly. In general it's a "cute" implementation but isn't too too useful and doesn't map well to how Wasm is embedded in many contexts. I'm deleting this to reduce maintenance burden on this repository. It would be ok to reimplement in the future but it would likely require someone with more Python knowledge than I. * The `wasmtime.bindgen` module is deleted in favor of component support in #308. This module still makes sense to have but it would need a ground-up rewrite to work with component types rather than component definitions. This is deferred to future work in #309 and in the meantime it's removed to avoid any confusion about what should be used and what shouldn't. Closes #105 Closes #106 Closes #107 Closes #108 Closes #109 Closes #119 Closes #143 Closes #178 Closes #181 Closes #197 Closes #202 Closes #218 Closes #245 Closes #282 Closes #302 * Remove some more metadata * Remove build-rust build config
1 parent 0513ef7 commit ea51991

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2
-6849
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,3 @@ runs:
1717
# Download precompiled wasmtime binaries for running the project
1818
- run: python ci/download-wasmtime.py
1919
shell: bash
20-
21-
# https://github.com/actions/cache/blob/main/workarounds.md#improving-cache-restore-performance-on-windows-using-cross-os-caching
22-
- if: ${{ runner.os == 'Windows' }}
23-
name: Use GNU tar
24-
shell: cmd
25-
run: |
26-
echo "Adding GNU tar to PATH"
27-
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
28-
29-
# Ensure the Rust lockfile is up-to-date
30-
- run: cargo fetch --manifest-path rust/Cargo.toml --locked
31-
shell: bash
32-
33-
# Install the `wasm-tools` binary with the `component` subcommand that is all
34-
# that's needed here.
35-
- uses: bytecodealliance/actions/wasm-tools/setup@v1
36-
with:
37-
version: "1.208.1"
38-
39-
# Build the bindgen wasm blob with some extra Rust targets.
40-
- run: |
41-
rustup target add wasm32-unknown-unknown wasm32-wasip1
42-
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
43-
echo CARGO_PROFILE_DEV_DEBUG=0 >> $GITHUB_ENV
44-
echo RUSTC_VERSION=`rustc --version` >> $GITHUB_ENV
45-
shell: bash
46-
- uses: actions/cache@v4
47-
with:
48-
path: rust/target
49-
key: rust-target-${{ env.RUSTC_VERSION }}-${{ runner.os }}-${{ hashFiles('rust/Cargo.lock') }}
50-
- run: python ci/build-rust.py
51-
shell: bash

ci/_custom_build/backend.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,5 @@ def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
8585
[sys.executable, 'ci/download-wasmtime.py', *download_args],
8686
check=True,
8787
)
88-
subprocess.run(
89-
[sys.executable, 'ci/build-rust.py'],
90-
check=True,
91-
)
9288

9389
return build_meta_orig.build_wheel(wheel_directory, config_settings, metadata_directory)

ci/build-rust.py

Lines changed: 0 additions & 45 deletions
This file was deleted.

examples/loader.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/loader_add.wat

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/loader_component.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/loader_component_add.wat

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/loader_load_python.wat

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/loader_load_wasi.wat

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/loader_load_wasm.wat

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)