Skip to content

Commit

Permalink
Use rust-script instead of cargo-script
Browse files Browse the repository at this point in the history
cargo-script no longer compiles on stable rust (1.47.0), and has not been
updated since October, 2017. rust-script is a maintained fork of cargo-script.

DanielKeep/cargo-script#71
  • Loading branch information
svend authored and micanzhang committed Feb 4, 2021
1 parent 6a82587 commit 30fe7e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ before_install:
sudo apt-get -qq -f install &&
sudo apt-get -qq install emacs25;
fi
- if cargo install --list | grep '^cargo-script ' >/dev/null; then
- if cargo install --list | grep '^rust-script ' >/dev/null; then
true;
else
cargo install cargo-script;
cargo install rust-script;
fi
- if [ "$EMACS" = "emacs23" ]; then
curl 'http://orgmode.org/org-8.2.5h.tar.gz' \
Expand Down
6 changes: 3 additions & 3 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ for more details or other methods installation, please visit: [[https://www.rust

** cargo script

You can install [[https://github.com/DanielKeep/cargo-script][cargo-script]] using Cargo's install subcommand:
You can install [[https://github.com/fornwall/rust-script][rust-script]] using Cargo's install subcommand:
#+BEGIN_SRC sh
cargo install cargo-script
cargo install rust-script
#+END_SRC

* TODOs

+ replace =cargo script= with =rustc= and run binary.
+ replace =rust-script= with =rustc= and run binary.
4 changes: 2 additions & 2 deletions ob-rust.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
;; - You must have rust and cargo installed and the rust and cargo should be in your `exec-path'
;; rust command.
;;
;; - cargo-script
;; - rust-script
;;
;; - `rust-mode' is also recommended for syntax highlighting and
;; formatting. Not this particularly needs it, it just assumes you
Expand Down Expand Up @@ -81,7 +81,7 @@ This function is called by `org-babel-execute-src-block'."
(with-temp-file tmp-src-file (insert wrapped-body))
(let ((results
(org-babel-eval
(format "cargo script %s" tmp-src-file)
(format "rust-script %s" tmp-src-file)
"")))
(when results
(org-babel-reassemble-table
Expand Down

0 comments on commit 30fe7e7

Please sign in to comment.