https://github.com/the-flx/flx-zig
Rewrite emacs-flx in Zig [maintainer=@jcs090218]
https://github.com/the-flx/flx-zig
flx fuzzy zig
Last synced: 5 months ago
JSON representation
Rewrite emacs-flx in Zig [maintainer=@jcs090218]
- Host: GitHub
- URL: https://github.com/the-flx/flx-zig
- Owner: the-flx
- License: mit
- Created: 2024-03-10T01:09:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T18:03:09.000Z (over 1 year ago)
- Last Synced: 2025-03-31T09:34:31.238Z (about 1 year ago)
- Topics: flx, fuzzy, zig
- Language: Zig
- Homepage: https://jcs090218.github.io/flx-zig/
- Size: 77.1 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)
[](https://ziglang.org/)
[](https://github.com/the-flx/flx-zig/releases/latest)
# flx-zig
> Rewrite emacs-flx in Zig
[](https://github.com/the-flx/flx-zig/actions/workflows/docs.yml)
[](https://github.com/the-flx/flx-zig/actions/workflows/test.yml)
## 🔧 Usage
```zig
const result: ?flx.Result = flx.score(allocator, "switch-to-buffer", "stb");
std.debug.print("{d}\n", .{result.?.score});
defer result.?.deinit(); // clean up
```
## 💾 Installation
1. Add the dependency to the `build.zig.zon` of your project.
```zig
.dependencies = .{
.flx = .{
.url = "https://github.com/jcs090218/flx-zig/archive/82eb49e8e26ceb53c58e2f4fe5bc2ab3f6ec91d4.tar.gz",
.hash = "12202ffde84f17914ba10f6bc1799738b5db997e6ff8f9092384c7f8f9f63bfa4c42",
},
},
```
2. Add the dependency and module to your `build.zig`.
```zig
const flx_dep = b.dependency("flx", .{});
const flx_mod = flx_dep.module("flx");
exe.addModule("flx", flx_mod);
```
3. Import it inside your project.
```zig
const flx = @import("flx");
```
*📝 P.S. See [examples](https://github.com/the-flx/flx-zig/tree/master/examples) for full example!*
## ⚜️ License
`flx-zig` is distributed under the terms of the MIT license.
See [`LICENSE`](./LICENSE) for details.
[flx]: https://github.com/lewang/flx