killerswan/rustx — Issue #2: Shebangs
Author: mcandre
Created: 2012-02-07 16:06:37+00:00
State: open

How can we modify rustx to work in shebangs like Perl, Python, Ruby, Lua, etc.?

hello.rs:

#!/usr/bin/env rustx

use std;

fn main() {
log "Hello World!";
}

expected output:

$ chmod a+x hello.rs
$ ./hello.rs
Hello World!

actual output:

$ chmod a+x hello.rs
$ ./hello.rs
Usage: rustx rust-source-file.rs