Coverage report: /home/ellis/comp/core/lib/cli/tools/rust.lisp
Kind | Covered | All | % |
expression | 0 | 51 | 0.0 |
branch | 0 | 4 | 0.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; cli/tools/rust.lisp --- Rust Tools
6
(in-package :cli/tools/rust)
8
(define-cli-tool :cargo (&rest args)
9
(let ((proc (sb-ext:run-program *cargo* (or args nil) :output t)))
10
(unless (eq 0 (sb-ext:process-exit-code proc))
11
(cargo-error "CARGO command failed: ~A ~A" *cargo* (or args "")))))
13
(define-cli-tool :rustup (&rest args)
14
(let ((proc (sb-ext:run-program *rustup* (or args nil) :output t)))
15
(unless (eq 0 (sb-ext:process-exit-code proc))
16
(cargo-error "RUSTUP command failed: ~A ~A" *rustup* (or args "")))))
18
(defun cargo-install (crate &key force git path)
19
(let ((args `(,@(etypecase crate
21
(symbol `(,(string-downcase crate)))
23
,@(when force '("--force"))
24
,@(when git `("--git" ,git))
25
,@(when path `("--path" ,path)))))
26
(apply 'run-cargo "install" args)))
28
(defun cargo-clean (&rest args)
29
(apply 'run-cargo "clean" args))