Skip to main content

Module thread

Module thread 

Source
Expand description

Plugin Thread: Dedicated thread for TypeScript plugin execution

This module implements a dedicated thread architecture for plugin execution, using QuickJS as the JavaScript runtime with oxc for TypeScript transpilation.

Architecture:

  • Main thread (UI) sends requests to plugin thread via channel
  • Plugin thread owns QuickJS runtime and persistent tokio runtime
  • Results are sent back via the existing PluginCommand channel
  • Async operations complete naturally without runtime destruction

Modules§

oneshot
Simple oneshot channel implementation

Structs§

PluginConfig
Configuration for a single plugin
PluginThreadHandle
Handle to the plugin thread for sending requests

Enums§

PluginRequest
Request messages sent to the plugin thread
TrackedAsyncResource
An async resource whose creation was confirmed by the editor. Used to update plugin_tracked_state for cleanup on unload.