feat(fzf): embed fzf binary #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/embed-fzf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #24, allows for the embedding of a statically-compiled fzf binary into wbij itself.
adds two compile options:
embed_fzf(bool, defaults tofalse): whether to embed fzffzf_path(?[]const u8): where to take the fzf binary fromand a struct
FzfBinProvider, which resolves the fzf path (or deploys our own if a cache is available)for example, to test with latest (as of writing) prebuilt static fzf:
WIP: feat(fzf): embed fzf binaryto feat(fzf): embed fzf binarythanks! awesome work
@ -30,0 +37,4 @@} else if (fzf_path != null) {std.log.info("-Dfzf_path=... has no effect without -Dembed_fzf", .{});}This relation between
embed_fzfandfzf_pathyou can solve this way thatembed_fzfin itself is?[]const u8and it accepts path for fzf binfair point, sounds good
@ -0,0 +31,4 @@_ = self;}/// Removes potentially created temporary filesadd
buildmodule also tomodmodule. This way, you will be able to importbuilddirectly here.i'm having some issues with Zig complaining about
buildexisting in multiple files (src/fzf/FzfBinProvider.zig:1:1: error: file exists in modules 'build' and 'build0'); do you happen to know any tricks i could use to get around that?@ -17,3 +18,3 @@queried_for_nondefault: bool, // referenced in select{Account,Contest,CodeLang}pub fn init(allocator: std.mem.Allocator, args: anytype) !Wbij {pub fn init(allocator: std.mem.Allocator, args: anytype, comptime has_embedded_fzf: bool) !Wbij {you don't need it if you add
buildmodule tomodmodule inbuild.zig; you can sourcebuilddirectly thenWill you manage to add
fzfas submodule and add fzf build step insidebuild.zigdirectly? Then you can import fzf binary as a build artifact into wbij.You can compile fzf with the following commands for static compilation:
4eb3501505to9de1c7ee6aView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.