From 725d6ab26e586659e04982b269694d2bc987fcd1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 23 Jul 2022 21:03:05 -0400 Subject: Add simple rust support in repl --- Biz/Ide/repl | 13 +++++++++---- 1 file 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 ## -- cgit v1.2.3