Releases: topheman/webassembly-component-model-experiments
[email protected]
What's Changed
You can now install the pluginlab
binary using homebrew:
brew install topheman/tap/pluginlab
or using cargo (existing way, still available - from source):
cargo install pluginlab
Full Changelog: https://github.com/topheman/webassembly-component-model-experiments/compare/[email protected]@0.6.0
[email protected]
What's Changed
Full Changelog: https://github.com/topheman/webassembly-component-model-experiments/compare/[email protected]@0.5.2
[email protected]
⚙️ pluginlab (rust cli)
New Features
-
Short flags for permissions: Added convenient short flags for common permission options:
-N
forallow-net
-R
forallow-read
-W
forallow-write
Usage examples:
pluginlab -R pluginlab -RW pluginlab -RWN # same as pluginlab -A
Dependencies
- Upgraded dependencies as part of #14:
- wasmtime: v33 → v35 (latest)
- tokio: 1.36 → 1.47.1 (latest)
- wasi-sdk: v25 → v27
- wit-bindgen-rt/wit-bindgen-cli: → v0.44.0
🌐 web-host
Full tee
plugin support: Complete implementation of the tee
command in the web host, including:
- Support for
tee -a
(append) functionality - Proper file overwriting behavior
- Comprehensive end-to-end testing
- Enhanced test utilities for better reliability
Technical Improvements (see #15)
- Local fork of
@bytecodealliance/preview2-shim
: Custom implementation to support advanced filesystem operations - Enhanced filesystem capabilities: Improved support for write operations and file descriptors
- Better scrolling experience: Fixed bouncing effect when scrolling on the REPL page
- Updated HomePage: More concise and improved user interface
Dependencies
- Upgraded dependencies as part of #14:
- @bytecodealliance/jco: Updated to latest version
- Node.js: Updated to v24.6.0
Testing
- Added comprehensive e2e tests for
tee
plugin functionality - Enhanced test utilities for better reliability and debugging
- Fixed flaky tests in the test suite
Note: This release includes significant dependency upgrades across all components. For detailed information about the dependency upgrade changes, see #14. The major feature addition supporting the tee
plugin in the web host is documented in #15.
[email protected]
🆕 New Features
plugin-tee
A new Rust-based plugin that implements the Unix tee
command functionality:
- File creation: Creates new files with content from the previous command output (
$0
) - File overwriting: Replaces existing file content
- Append mode: Supports
-a
or--append
flags to append content to existing files - Error handling: Provides detailed error messages for permission issues and file operations
- Integration: Works seamlessly with other plugins like
echo
andcat
in the REPL workflow
The plugin demonstrates the new plugin API capabilities by accessing REPL variables through the enhanced host interface.
⚠️ Breaking Changes
1. WIT Contract Changes (plugin-api.wit)
- Added:
host-state-plugin
interface withget-repl-var
function - Purpose: Allows plugins to access specific REPL variables by name (e.g.,
$0
for previous command output) - Impact: All existing plugins must be recompiled against the new WIT contracts
2. WIT Contract Changes (host-api.wit)
- Removed:
set-repl-var
function fromhost-state
interface - Reason: Functionality moved to plugin-specific interface for better separation of concerns
- Impact: REPL logic components must be updated to use the new interface structure
🔧 Technical Implementation
- Plugin Host: Enhanced with thread-safe REPL variable sharing using
Arc<Mutex<T>>
- WASM Integration: New bindings generated for all plugins to support the updated WIT contracts
- Testing: Comprehensive test coverage for plugin-tee including file creation, overwriting, and append scenarios
- Permissions: Plugin requires appropriate filesystem permissions (
--allow-all
for full functionality)
🧪 Testing
- ✅ plugin-tee functionality (new file, overwrite, append)
- ✅ Integration with existing plugins (echo, cat)
- ✅ Error handling and permission management
- ✅ WIT contract compatibility across all components
📚 Documentation
- Added comprehensive README for plugin-tee
- Updated WIT interface documentation
- Enhanced test coverage demonstrating plugin capabilities
🌐 Web Version Note
The web version of plugin-tee
is not part of this PR, it will be added in another one, see issue #12
This release represents a significant step forward in plugin capabilities while maintaining the REPL's core functionality and security model.
Installation
cargo install [email protected]
Full changelog: 0.4.2...0.5.0
PRs:
- #11 Add plugin-tee and introduce breaking WIT changes for enhanced plugin capabilities
[email protected]
🚀 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
[email protected]
🚀 New Features
CI/CD Improvements
Added pre-release workflow that automatically uploads wasm files as assets when tags are created (#7). Available on the releases page.
🔧 Infrastructure & Tooling
Build System Refactoring
- Migrated from Node.js-based
prepareWasmFiles.ts
to shell scriptprepare-wasm-files.sh
to avoid the need of nodeJS runtime on the rust CI workflow - Added
test-mono
command to justfile for running tests without parallelism - Optimized build process by deduplicating C plugin builds
📚 Documentation
Enhanced Documentation
- Added comprehensive CI section to root README explaining the continuous integration setup
- Updated pluginlab README with detailed CI workflow information
- Improved project documentation for better developer onboarding
📦 Versioning
This release introduces a versioning of the plugins compiled to wasm, so that an old pluginlab
binary could use compatible plugins.
Full Changelog: 0.4.0...0.4.1
[email protected]
🔧 pluginlab crate
🐛 Bug Fixes
- Permission precedence fix: Fixed an issue where
--allow-all
flag wasn't properly overriding--allow-net
permissions. Previously, when both--allow-all
and--allow-net
were specified, the network permissions would be determined by--allow-net
instead of granting all permissions as expected. Now--allow-all
correctly takes precedence and grants full permissions.
✨ New Features
- Improved
list-commands
output: Thelist-commands
command now provides a cleaner, tab-separated output format that clearly distinguishes between plugin commands and reserved commands. It also now lists theman
command as a reserved command.
🌐 web-host
✨ New Features
- Enhanced REPL experience: Added log message when REPL host is ready
- Example tracking: Added badge on wand button to track which examples haven't been tested yet
- Mobile UX improvements: Removed autoComplete/Correct/Capitalize to prevent mobile keyboard interference with user inputs
🧪 Testing & Quality
- Added comprehensive tests for the new
man
command functionality - Enhanced test coverage for
list-commands
output changes
📦 Installation
cargo install [email protected]
Full Changelog: https://github.com/topheman/webassembly-component-model-experiments/compare/[email protected]@0.4.0
[email protected]
🧪 Testing & Quality
🎭 Comprehensive E2E Testing with Playwright @topheman in #5
- Added full end-to-end testing suite for web host with cross-browser support (Chromium, Firefox, WebKit)
- Comprehensive test coverage: REPL logic, plugin interactions, UI behavior, navigation
- Automated CI/CD integration with GitHub Actions
- Network request mocking for reliable external API testing
- See pull request #5 for detailed implementation
🔧 Code Architecture
- Implemented bin-in-lib pattern for better encapsulation and API design
- Improved module visibility control and separation of concerns
- Use
npm ci
instead ofnpm install
in GitHub Actions by @topheman in #4
This release focuses on testing infrastructure improvements and code architecture enhancements, ensuring robust cross-browser compatibility for the web host.
Full Changelog: https://github.com/topheman/webassembly-component-model-experiments/compare/[email protected]@0.3.0
[email protected]
🔧 pluginlab crate
🔒 Enhanced Security Model with Permission System
- Added comprehensive permission system for WebAssembly plugin sandboxing
- New CLI flags for fine-grained control over plugin permissions:
--allow-net [<DOMAINS>]
: Control network access--allow-read
: Allow filesystem read access--allow-write
: Allow filesystem write access--allow-all
/-A
: Allow all permissions (shorthand)
- Plugins are now sandboxed by default - no filesystem or network access unless explicitly permitted
- Network permissions are checked before any network calls are made
- File system permissions are enforced through preopens with appropriate read/write flags
🧪 Testing & Quality
- Added comprehensive tests for permission system edge cases
- Fixed failing tests for
ls
andcat
plugins to include required--allow-read
flag - Added test coverage for permission validation scenarios including network access control and filesystem permission enforcement
- Existing plugins that access filesystem now require
--allow-read
flag - Network-enabled plugins now require
--allow-net
flag - Use
--allow-all
to maintain previous behavior for all plugins
🌐 web-host
🛠️ Build Tools
- Added
prepareFilesystem.ts
CLI script to prepare a virtual filesytem based on/fixtures/filesystem
folder - Expose the virtual filesystme to plugins through the
@bytecodealliance/preview2-shim/filesystem
shim
🎯 Migration Guide
To upgrade from v0.1.0 to v0.2.0 for the CLI host pluginlab
:
- For existing scripts: Add
--allow-all
flag to maintain current behavior - For security-conscious usage: Use specific permission flags:
--allow-read
allows read access to the filesystem--allow-net
allows network access to the plugins, you can specify a list of domains comma separated (by default, no network access is allowed)--allow-write
allows write access to the filesystem
Example Usage
# Allow all permissions (v0.1.0 behavior)
pluginlab --repl-logic <url> --plugins <urls> --allow-all
# Granular permissions
pluginlab --repl-logic <url> --plugins <urls> --allow-read --allow-net google.com,api.weatherapi.com
This release significantly enhances the security model while maintaining backward compatibility through the --allow-all
flag. The permission system provides fine-grained control over plugin capabilities, making pluginlab suitable for running untrusted WebAssembly plugins safely.