extism-fsnotify

command module
v0.0.0-...-e87323c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

extism-fsnotify

https://user-images.githubusercontent.com/7517515/188239556-029f5142-0cb8-4bfb-a5b2-e4bbe29e25c6.mp4

Use the filesystem as a computing environment.

make build-plugins # requires Rust toolchain
make run # requires Go toolchain
Demo: construct programmable directories on your filesystem.
  • plugins/invert: invert the colors of a PNG file

    • add a new PNG to the directory containing this .wasm plug-in
    • see new PNG replacing the original with inverted colors
  • plugins/md2html: convert Markdown in to HTML files

    • add a Markdown file to the directory containing this .wasm plug-in
    • see a new HTML file generated next to the Markdown file

The host program runs a recursive watcher, to build the initial structure, and all new directories with files + .wasm are watched and computed.

For each file create operation, the .wasm is loaded and passed the file that triggered the event.

This program treats a directory, a written file, and a single .wasm module as the unit of computation.

Data types
  1. Host -> Plug-in
{
  "event_file_name": "path/to/file.md",
  "event_file_data": "<base64 encoded file>"
}
  1. Plug-in -> Host
{
  "op": "create",
  "output_file_name": "path/to/file.md",
  "output_file_data": "<base64 encoded file>"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址