·
65 commits
to master
since this release
🚀 New Features
Enhanced Error Handling for WIT Interface Mismatches
- Added intelligent error detection when loading incompatible WebAssembly plugins
- Provides user-friendly error messages with specific solutions when WIT interface mismatches occur
- Automatically suggests compatible plugin versions for the current
pluginlab
version - Offers guidance to update to the latest
pluginlab
version when needed
🔧 Improvements
Better Testing Infrastructure
- Split end-to-end tests into dedicated
e2e_cli_host.rs
module for better organization - Enhanced test coverage for CLI host functionality
- Added comprehensive test cases for invalid WIT plugin scenarios
- Included test fixture (
valid-plugin-with-invalid-wit.wasm
) for testing compatibility errors
Web UI
- Animation on the wand button on first load to incite user to use it
- Add
echoc
to the example commands
🔍 Technical Details
The main improvement in this release is the enhanced error handling in WasmHost::load_plugin()
that detects WIT interface mismatches and provides helpful error messages. When a plugin with an incompatible WIT interface is loaded, users now receive:
- Clear error identification: "You are most likely trying to use a plugin not compatible with
[email protected]
" - Specific solution: Direct link to compatible plugin versions for the current
pluginlab
version - Alternative solution: Guidance to update to the latest
pluginlab
version - Original error: Preserved for debugging purposes
This significantly improves the user experience when working with plugins across different versions of the WebAssembly Component Model ecosystem. For more details on versioning and plugin compatibility, see the versioning documentation.
Example of cli output when loading a plugin with an incompatible version:
pluginlab\
--repl-logic https://topheman.github.io/webassembly-component-model-experiments/plugins/repl_logic_guest.wasm\
--plugins https://topheman.github.io/webassembly-component-model-experiments/plugins/plugin_echo.wasm
[Host] Starting REPL host...
[Host] Loading REPL logic from: https://topheman.github.io/webassembly-component-model-experiments/plugins/repl_logic_guest.wasm
[Host] Loading plugin: https://topheman.github.io/webassembly-component-model-experiments/plugins/plugin_echo.wasm
[Host]
[Host] Error: Failed instanciating https://topheman.github.io/webassembly-component-model-experiments/plugins/plugin_echo.wasm
[Host] You are most likely trying to use a plugin not compatible with [email protected]
[Host]
[Host] Try using a compatible version of the plugin by passing the following flag:
[Host] --plugins https://github.com/topheman/webassembly-component-model-experiments/releases/download/[email protected]/plugin_echo.wasm
[Host]
[Host] If it doesn't work, make sure to use the latest version of pluginlab: `cargo install pluginlab`
[Host]
[Host] Original error:
Error: failed to convert function to given type
Caused by:
0: type mismatch with results
1: expected record of 3 fields, found 4 fields
Update to latest version:
cargo install pluginlab
Full Changelog: 0.4.1...0.4.2