Skip to content

Embed URL


Subversion checkout URL

You can clone with
Download ZIP

Prototyping Rust Code in CodeRunner

CodeRunner is a nifty little app for OSX that allows you to play around with test code with minimal fuss. Here are some instructions for setting it up to build Rust code.


Setup instructions

  1. Go to CodeRunner > Preferences...
  2. Select the Languages tab
  3. Down the bottom of the list view, click the plus sign to add a new language called Rust
  4. Enable the Language uses compilation script checkbox, and click Edit script
  5. Copy the following code into

compname=`echo "$1" | sed 's/\(.*\)\..*/\1/'`
rustc $3 "$1" -o "$compname"
if [ $status -eq 0 ]; then
    echo $compname
    exit 0
elif [ $status -eq 127 ]; then
    echo -e "\nTo run code in this language, you need to install the Rust compiler from"
exit $status
  1. In the Run Command textbox, enter ./$compiler.
  2. Add the following text to the Code Template:
fn main() {
  1. Set the Syntax Mode to None
  2. Enter rs for the File Extension

Broken for me until I did "] then" -> "]; then".


When attempting to run the same code snippet as in the screenshot above I receive a "Untitled: No such file or directory". I am wondering if there are other path variables or configuration settings I am missing in CodeRunner.


bjz commented

Sorry guys for the late replies, gist doesn't seem to notify you of comments.

@taliesinb woops, updated

@ttdonovan Not sure. Could you post an image of your prefs? Btw, are you running 0.9-pre? The 'no debug symbols' thing has been fixed for a while.


Hey, thanks a lot for posting this. You rock.


Here is what I got on CodeRunner 2:

error: couldn't read .: IoError { kind: InvalidInput, desc: "couldn\'t open path as file", detail: Some("is a directory; path=.; mode=open; access=read") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.