Function: ghostel-module-compile
ghostel-module-compile is an interactive and natively compiled
function defined in ghostel-module-install.el.
Signature
(ghostel-module-compile)
Documentation
Compile the ghostel native module by running zig build.
The output is shown in a *compilation* buffer.
The produced module is moved into ghostel-module-directory once
the build finishes.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-module-install.el
(defun ghostel-module-compile ()
"Compile the ghostel native module by running zig build.
The output is shown in a `*compilation*' buffer.
The produced module is moved into `ghostel-module-directory' once
the build finishes."
(interactive)
(save-some-buffers (not compilation-ask-about-save)
compilation-save-buffers-predicate)
(let* ((source-dir (ghostel--resource-root))
(dest-dir (ghostel--module-directory))
(build-dir (ghostel--make-module-build-dir dest-dir))
(default-directory source-dir)
(compile-buf (compilation-start
(format ghostel-module-compile-command
(shell-quote-argument (expand-file-name build-dir)))
#'ghostel-module-compilation-mode
#'ghostel--module-compilation-buffer-name)))
(ghostel--install-built-module-on-finish compile-buf build-dir dest-dir)))