pelican-plugins / search

Pelican plugin that adds site search capability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use wasm Stork to build the index?

maphew opened this issue · comments

Maybe this is a stupid question born of ignorance, but is there a way to use the wasm version of Stork to build the search index instead of having to compile an executable for the local platform?

  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Issue

Why: on Windows installing Stork requires downloading ~7 GB of Visual Studio build tools and installing 'Desktop development with C++' kit, on top of Rustup (recipe).

Running wasm locally is reportedly possible: https://blog.devgenius.io/running-wasm-binaries-in-on-your-local-system-69694e100083, though this example also requries a local compiler so, yeah, nothing gained. However that was over 2 years ago so maybe there are other ways?

well I can report the naive approach doesn't work! ;-)

» winget install wasmer
» refreshenv
» set STORKVERSION="v1.5.0"
» wget https://files.stork-search.net/releases/%STORKVERSION%/stork.wasm

» wasmer run stork.wasm
error: failed to run `stork.wasm`
╰─▶ 1: Error while importing "wbg"."__wbg_new_693216e109162396": unknown import. Expected Function(FunctionType { params: [], results: [I32] })

Good to know! Thanks for trying. I agree it'd be nice not to have to rely on platform-specific binaries. I suspect the Stork Discussions forum might be a good place to ask James about this, since he'll certainly know more about the feasibility than I do. 😊