Tiny Unix editor launcher for $EDIT_EDITOR, $VISUAL, $EDITOR, or vi.
cargo build --release --bin editThe binary is written to target/release/edit.
To check the library crate:
cargo build --release --libCargo builds the normal Rust library artifact for use by Rust crates.
To prefer dynamic Rust linking for the binary:
RUSTFLAGS="-C prefer-dynamic" cargo build --release --bin editThat requires the matching Rust toolchain libraries to be available at runtime.
A Rust dylib is not a stable C ABI; foreign-language callers need a separate
cdylib API.
edit path/to/file.txt
edit file1.txt file2.txtedit::open(None, ["file.txt"]); // uses VISUAL, EDITOR, vi
edit::open(Some("MY_APP_EDITOR"), ["file.txt"]); // app override first
edit::spawn(None, ["file.txt"])?; // starts the editorBSD 3-Clause