Crate evoke

Crate evoke 

Source
Expand description

Format, lint, build, and deploy workspace binaries and Nvim libs.

Β§Arguments

  • --debug Use debug profile; skip clippy; copy from target/debug.
  • bins_path Destination for binaries (default: $HOME/.local/bin).
  • cargo_target_path Cargo target root (default: workspace target/).
  • nvim_libs_path Destination for Neovim libs (default: $HOME/.config/nvim/lua).

Β§Usage

evoke # fmt + clippy + build --release, copy bins & libs
evoke --debug # fmt + build debug (skip clippy) copy from target/debug
evoke --debug "$HOME/.local/bin" "$PWD/target" "$HOME/.config/nvim/lua"

Β§Errors

  • Resolving required environment variables fails or yields invalid Unicode.
  • Running cargo fmt, cargo clippy, or cargo build fails.
  • Copying a binary or library fails.

ConstantsΒ§

BINS πŸ”’
List of binaries that should be copied after building. NOTE: if a new binary is added this list must be updated!
BINS_DEFAULT_PATH πŸ”’
Path segments for the default binaries install dir.
LIBS πŸ”’
List of library files that need to be renamed after building, mapping (source_name, target_name).
NVIM_LIBS_DEFAULT_PATH πŸ”’
Path segments for the Nvim libs install dir.

FunctionsΒ§

cp πŸ”’
Copies a built binary or library from from to to using [ytil_sys::file::atomic_cp] and prints an β€œInstalled” status line.
drop_element πŸ”’
Removes the first occurrence of an element from a vector. Returns true if found and removed, false otherwise.
main πŸ”’
Format, lint, build, and deploy workspace binaries and Nvim libs.
remove_last_n_dirs πŸ”’
Removes the last n directories from a PathBuf.