Skip to content

Conversation

@chrisdickinson
Copy link

Add extism.CompiledPlugin, which may be provided as the wasm parameter to extism.Plugin.

Add `extism.CompiledPlugin`, which may be provided as the `wasm` parameter
to `extism.Plugin`.
@chrisdickinson
Copy link
Author

(Tests will fail until we cut a new release of extism/extism!)

Copy link
Contributor

@zshipko zshipko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From reading through it looks good - I couldn't figure out how to run the tests locally with a custom built extism-sys, but if you were able to confirm these changes then feel free to merge. Otherwise we can just wait until the next libextism release.

@chrisdickinson
Copy link
Author

Thanks for the review! I tested via:

~/extism/extism-maturin $ git rev-parse --short HEAD
4db57de

~/extism/extism-maturin $ maturin build -i python3.11
🔗 Found cffi bindings
🐍 Using CPython 3.11 at /opt/homebrew/opt/python@3.11/bin/python3.11 to generate the cffi bindings
📡 Using build options bindings from pyproject.toml
💻 Using `MACOSX_DEPLOYMENT_TARGET=11.0` for aarch64-apple-darwin by default
   Compiling extism v0.0.0+replaced-by-ci (~/extism/runtime)
   Compiling extism-sys v0.0.0+replaced-by-ci (~/extism/extism-maturin)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.00s
💼 Using the existing header at ~/extism/target/header.h
📦 Built wheel to ~/extism/target/wheels/extism_sys-0.0.0+replaced.by.ci-py3-none-macosx_11_0_arm64.whl

~/extism/extism-maturin $ cd ../python-sdk

~/python-sdk $ rm -f uv.lock && uv add --force-reinstall ~/extism/target/wheels/extism_sys-0.0.0+replaced.by.ci-py3-none-macosx_11_0_arm64.whl

~/python-sdk $ uv run python -m unittest discover
.............
----------------------------------------------------------------------
Ran 13 tests in 1.738s

OK

I might run a libextism patch release tomorrow just to boot out those changes.

@chrisdickinson chrisdickinson merged commit 2e83a8c into main Nov 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants