https://github.com/the-flx/zig-flx
Zig bindings for flx-c
https://github.com/the-flx/zig-flx
flx fuzzy zig
Last synced: 5 months ago
JSON representation
Zig bindings for flx-c
- Host: GitHub
- URL: https://github.com/the-flx/zig-flx
- Owner: the-flx
- License: mit
- Created: 2024-03-08T07:24:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T18:03:06.000Z (over 1 year ago)
- Last Synced: 2025-03-31T09:34:28.744Z (about 1 year ago)
- Topics: flx, fuzzy, zig
- Language: Zig
- Homepage: https://jcs090218.github.io/zig-flx/
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
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/zig-flx/releases/latest)
# zig-flx
> Zig bindings for flx-c
[](https://github.com/the-flx/zig-flx/actions/workflows/docs.yml)
[](https://github.com/the-flx/zig-flx/actions/workflows/test.yml)
## 🔧 Usage
```zig
const std = @import("std");
const flx = @import("flx");
pub fn main() !void {
const result = flx.score("switch-to-buffer", "stb");
std.debug.print("Score: {d}", .{result.*.score});
}
```
## 💾 Installation
1. Add the dependency to the `build.zig.zon` of your project.
```zig
.dependencies = .{
.flx = .{
.url = "https://github.com/the-flx/zig-flx/archive/9370accf3bb09a9e27a8c3a6ed7181cecc6679be.tar.gz",
.hash = "12205a4519fc774374102a05b52a460e4598019dc775d7fb535517171a45abad3a08",
},
},
```
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/zig-flx/tree/master/examples) for full example!*
## ⚜️ License
`zig-flx` is distributed under the terms of the MIT license.
See [`LICENSE`](./LICENSE) for details.
[flx]: https://github.com/lewang/flx