[DRAFT] POC to add WebAssembly Based Plugin System to OpenBB Terminal #5871
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is for discussion purposes only, and not intended to be merged
Overview
Experimental PR to add a WebAssembly (Wasm) based plugin system to the OpenBB Terminal. Uses Extism, a Wasm framework, to speed up the development process and to improve the developer experience of using Wasm.
This PR focuses on the use case of creating various trading strategies as Extism plugins that can be dynamically loaded into the OpenBB terminal and executed using the Backtester. Strategies can be created in any language supported by Extism. WebAssembly provides sandboxed execution of plugins so the host process is protected from the inherent dangers of running arbitrary code.
Other possible use cases for plugins could include additional data source integrations, screeners, scripts, enhancements to existing commands, etc.
Also could be interesting to explore compiling the entire OpenBB SDK itself as an Extism Plugin. This would enable it to be used as a package in any host language supported by Extism. However, this would require the completion of a Python PDK that supports native dependencies. See note on Current Limitations below.
Goals
Implementation Details
install plugin <url>
)Demo
https://www.loom.com/share/615861dc013c49c09be436220bc100dc?sid=1bbcc744-ff0c-4cc2-855f-0a1c0421426f
Setup
Follow instructions here on the Python tab to install the required package
Current Limitations