Skip to content

Use text-based scripts, such that any wasm runtime can be used #15

@DougAnderson444

Description

@DougAnderson444

Putting this down as a marker.

Related: cryptidtech/wacc#1

This is what I intend to submit as a Pull Request:

  1. Replace the wasmtime WACC with a flexible wasm-component

This will give a clean interface that can be swapped out with any implementation (wasmtime, wasi, v8 engine, browser, wasm_component_layer), and upgraded without breaking changes.

  1. Replace hard coded symlinks and Rhai with a simple DSL.

Use pest to write a simple grammer to parse text scripts into an Abstract Syntax Tree, then eval that syntax tree into the check_signature functions in Rust (or whatever language you've written the component in).

Impact

This will result in the script being plain text.

This plain text is what generates each hash message digest.

This plain text is then parsed into the AST by the pest grammar and run against the WACC functions.

The pairs are get/put across the wasm interface so they effectively act like a trait and can be implemented by any type of structure.

PR incoming as I find the time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions