/flx-zig

Rewrite emacs-flx in Zig [maintainer=@jcs090218]

Primary LanguageZigMIT LicenseMIT

License: MIT Release

flx-zig

Rewrite emacs-flx in Zig

Docs CI

🔧 Usage

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.
.dependencies = .{
    .flx = .{
        .url = "https://github.com/jcs090218/flx-zig/archive/82eb49e8e26ceb53c58e2f4fe5bc2ab3f6ec91d4.tar.gz",
        .hash = "12202ffde84f17914ba10f6bc1799738b5db997e6ff8f9092384c7f8f9f63bfa4c42",
    },
},
  1. Add the dependency and module to your build.zig.
const flx_dep = b.dependency("flx", .{});
const flx_mod = flx_dep.module("flx");
exe.addModule("flx", flx_mod);
  1. Import it inside your project.
const flx = @import("flx");

📝 P.S. See examples for full example!

🔍 See Also

  • flx - Original algorithm in Emacs Lisp
  • flx-rs - Rewrite emacs-flx in Rust for dynamic modules
  • FlxCs - Rewrite emacs-flx in C#
  • flx-ts - Rewrite emacs-flx in TypeScript, with added support for JavaScript
  • flx-c - Rewrite emacs-flx in C

⚜️ License

flx-zig is distributed under the terms of the MIT license.

See LICENSE for details.