Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neoclide/wasm-fuzzy
Fuzzy match at native speed
https://github.com/neoclide/wasm-fuzzy
Last synced: 14 days ago
JSON representation
Fuzzy match at native speed
- Host: GitHub
- URL: https://github.com/neoclide/wasm-fuzzy
- Owner: neoclide
- Created: 2022-09-23T07:46:15.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-25T10:01:02.000Z (about 2 years ago)
- Last Synced: 2024-08-01T19:38:58.627Z (3 months ago)
- Language: C
- Size: 29.3 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Wasm-fuzzy
Wasm module for fuzzy match with native performance.
C code mostly form source code of vim in `src/search.c`.
## Build
Requires [wasi](https://github.com/WebAssembly/wasi-sdk) and optional [wabt](https://github.com/WebAssembly/wabt).
Binary file also provided from [release page](https://github.com/neoclide/wasm-fuzzy/releases)
Change the SDK part in Makefile.
Run command:
```sh
make
node index.js
```Result should looks like:
```
Match fb => fooBar
Matched score & positions 135 Uint32Array(2) [ 0, 3 ]
Match fb => fobbbdefo/Bar
Matched score & positions 114 Uint32Array(2) [ 0, 10 ]
Match fb => foot, No match
Done
```## LICENSE
MIT