Open tedil opened 2 months ago
I added a little criterion benchmark comparing calling a compiled wasm plugin and doing the same* work natively, here are some first insights:
i.e. some time is spent on serde to/from json, some time is spent on cloning, some time is spent on WASM overhead I guess.
This draft PR adds a plugin system based on extism (#426). To that end, the project is converted to a workspace with (currently) three members:
mehari
,mehari-plugins
andmehari-plugin-vep-nmd
.mehari
remains unchangedmehari-plugins
currently contains stubs mimicking VEP'stva
data structure, whilemehari-plugin-vep-nmd
contains a translation of VEP's NMD plugin to rust code.mehari-plugin-vep-nmd
has a different build-target (wasm32-unknown-unknown
) than the other workspace members, and, as such, it has a corresponding.cargo/config.toml
file.However, workspaces do not support having different targets (yet), so cargo will build all workspace members for the default target. To actually get a WASM binary for the plugin, explicitly execute
cargo build
in themehari-plugin-vep-nmd
directory. (Could probably be done with a Makefile or something similar, at least until the different-targets-per-workspace-member feature hits stable)