NostrScript

NostrScript is a WebAssembly implementation that interacts with Damus.
It enables dynamic scripting that can be used to power custom list views,
enabling pluggable algorithms.

The web has JavaScript, Damus has NostrScript. NostrScripts can be
written in any language that compiles to WASM.

This commit adds a WASM interpreter I've written as a mostly-single C
file for portability and embeddability. In the future we could
JIT-compile these for optimal performance if NostrScripts get large and
complicated. For now an interpreter is simple enough for algorithm list
view plugins.

Changelog-Added: Add initial NostrScript implementation
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2023-06-02 18:51:49 -07:00
parent 0c0c58c0cc
commit 97f10e865f
31 changed files with 9623 additions and 117 deletions

View File

@@ -1,5 +1,5 @@
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = with python3Packages; [ Mako requests ];
buildInputs = with python3Packages; [ Mako requests wabt ];
}