Documentation
¶
Overview ¶
embed-fetcher-plugin shows a host application embedding scriptling with fetcher plugins enabled: scripts and libraries are pulled from a plugin over the plugin protocol, on demand, with nothing on the local filesystem.
This is the same wiring the CLI performs, in the order it matters:
- build a plugin.Manager and load the plugins;
- bridge the manager's fetchers into a pack scheme registry;
- open the packages the plugins declare (or any scheme:// source);
- put those bundles behind the interpreter's library loader;
- fetch and run a script that lives in the plugin.
Run it with:
go run ./examples/embed-fetcher-plugin
It builds the fetcher-go example plugin into a temp dir and drives it, so it needs no external service.
Click to show internal directories.
Click to hide internal directories.