@wonfsy/wonfy-tools
v0.2.2
Published
Collection of tools for personal use, provides library and CLI.
Downloads
55
Readme
Wonfy Tools
Simple collection of tools, mostly for personal usage.
You can checkout deployed version with UI on https://tools.won.fyi
[!NOTE] Since 0.2.0 the stitcher runs its matching on the GPU through wgpu. Natively it uses Vulkan/DX12/Metal; in the browser it requires WebGPU support.
stitchis now async in both the Rust and JS APIs (stitch_blockingis available natively).
You can install is as a cli
cargo install wonfy-tools --features clithen use it as
wonfy-tools-cli -f ./0.png ./1.png ...can use --help to list all possible inputs for the cli
wonfy-tools-cli --helpOr add it as a library
cargo add wonfy-toolsOr add it as an npm dependency
npm install @wonfsy/wonfy-toolsThen initiating the wasm before using any of the functionality.
import initWasm, { stitch } from "@wonfsy/wonfy-tools";
async function main() {
await initWasm();
const result = await stitch(/* params */);
}If you're using a bundler, you're gonna have to tell the bundler to include the wasm file and then get a link to it.
Example for vite
import initWasm, { stitch } from "@wonfsy/wonfy-tools";
import wasmUrl from "@wonfsy/wonfy-tools/wonfy_tools_bg.wasm?url"
async function main() {
await initWasm({ module_or_path: wasmUrl });
const result = await stitch(/* params */);
}