Skip to content

Releases: topheman/webassembly-component-model-experiments

[email protected]

03 Sep 10:14
Compare
Choose a tag to compare

What's Changed

  • Add Homebrew Support and Cross-Compilation Pipeline by @topheman in #17

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]

26 Aug 14:41
Compare
Choose a tag to compare

What's Changed

  • Add Go Language Support for WebAssembly Component Model Plugins by @topheman in #16

Full Changelog: https://github.com/topheman/webassembly-component-model-experiments/compare/[email protected]@0.5.2

[email protected]

21 Aug 12:46
Compare
Choose a tag to compare

⚙️ pluginlab (rust cli)

New Features

  • Short flags for permissions: Added convenient short flags for common permission options:

    • -N for allow-net
    • -R for allow-read
    • -W for allow-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]

16 Aug 17:41
Compare
Choose a tag to compare

🆕 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 and cat 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 with get-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 from host-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]

25 Jul 16:01
Compare
Choose a tag to compare

🚀 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:

  1. Clear error identification: "You are most likely trying to use a plugin not compatible with [email protected]"
  2. Specific solution: Direct link to compatible plugin versions for the current pluginlab version
  3. Alternative solution: Guidance to update to the latest pluginlab version
  4. 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]

24 Jul 08:44
Compare
Choose a tag to compare

🚀 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 script prepare-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]

17 Jul 07:51
Compare
Choose a tag to compare

🔧 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: The list-commands command now provides a cleaner, tab-separated output format that clearly distinguishes between plugin commands and reserved commands. It also now lists the man 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]

14 Jul 12:09
Compare
Choose a tag to compare

🧪 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 of npm 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]

11 Jul 15:12
Compare
Choose a tag to compare

🔧 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 and cat plugins to include required --allow-read flag
  • Added test coverage for permission validation scenarios including network access control and filesystem permission enforcement

⚠️ Breaking Changes

  • 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:

  1. For existing scripts: Add --allow-all flag to maintain current behavior
  2. 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.

📋 View changes between v0.1.0 and v0.2.0