/magit-libgit2

Experimental libgit2 support for magit, using Rust

Primary LanguageShell

Experimental libgit2 support for magit

Note: Do not use this, unless you are interested in Rust. Magit is getting its own libgit2 binding through C.

Installation

Install Rust tool chain. Build the dylib:

cargo build
cd target/debug
ln -s libmagit_libgit2.dylib magit-libgit2.so

Load it in Emacs:

(add-to-list 'load-path "/path/to/magit-libgit2/target/debug")
(require 'magit-libgit2)
(add-to-list 'load-path "/path/to/magit-libgit2/elisp")
(require 'magit-libgit2-x)

Development

cargo install cargo-watch

Interactive development

In Emacs:

(server-start)

Recompile and reload the module every time the code changes:

cargo watch -x build -s ./bin/load.sh

Note: Don’t add /path/to/magit-libgit2/target/debug to load-path. Don’t use Emacs’s default loading mechanism.

Continuous testing

cargo watch -x build -s ./bin/test.sh