Note: Do not use this, unless you are interested in Rust. Magit is getting its own libgit2 binding through C.
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)
cargo install cargo-watch
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.
cargo watch -x build -s ./bin/test.sh