summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-07-23 21:03:05 -0400
committerBen Sima <ben@bsima.me>2022-07-23 21:03:05 -0400
commit725d6ab26e586659e04982b269694d2bc987fcd1 (patch)
tree71da090ad050bc3d5e41874fbd9cd7bf5bca3de9 /Biz
parent83c9055b3e238a6ae2c710d00497adf5974db5e0 (diff)
Add simple rust support in repl
Diffstat (limited to 'Biz')
-rwxr-xr-xBiz/Ide/repl13
1 files changed, 9 insertions, 4 deletions
diff --git a/Biz/Ide/repl b/Biz/Ide/repl
index cf800aa..7101add 100755
--- a/Biz/Ide/repl
+++ b/Biz/Ide/repl
@@ -35,7 +35,7 @@ fi
"${flags[@]}" \
--packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.ghcWith (h: with h; [$langdeps])" \
--command "ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci ${targets[@]}"
- ;;
+ ;;
Scm)
for lib in ${langdeps[@]}; do
flags+=(--packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.nixpkgs.guile-${lib}")
@@ -44,16 +44,21 @@ fi
"${flags[@]}" \
--packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.nixpkgs.guile_3_0" \
--command "guile -L $BIZ_ROOT -C $BIZ_ROOT/_/int --r7rs --listen=${PORT:-37146}"
- ;;
+ ;;
Lisp)
nix-shell \
"${flags[@]}" \
--packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.sbclWith (p: with p; [asdf swank $langdeps])" \
--command "sbcl --eval '(require :asdf)' --eval '(require :swank)' --eval '(swank:create-server :port ${PORT:-4005})' --load $targets"
- ;;
+ ;;
+ Rs)
+ nix-shell \
+ "${flags[@]}" \
+ --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).private.nixpkgs.rustc"
+ ;;
*)
echo "unsupported targets: ${targets[@]}"
exit 1
- ;;
+ ;;
esac
##