Coder Social home page Coder Social logo

rustx's Introduction

rustx

Build Status

  • rustx: Inspired by runhaskell, this script compiles a rust file and runs it immediately. (This can be launched from a source file via #!/usr/bin/env rustx, too.)
  • rustt: This script compiles a rust file's tests and runs them.
  • _rustx: This is a dummy Rust program...

At the moment, this git repo doesn't seem to work quite right with rustpkg, but I'll sort that out soon enough!

-- Kevin Cantu, October 2013

Install

make install

rustx's People

Contributors

decentninja avatar killerswan avatar kylewlacy avatar mcandre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rustx's Issues

Fix syntax for test code

For example this code doesn't compile with rustt or with manual options to rustc:


//#!/usr/bin/env rustx

fn main () {
   io::println("Hello!");
}

#[test]
fn test () {
   assert 2 + 2 == 4;
}

In action:

$ rustt _rustx.rs
_rustx.rs:1:0: 1:0 error: unresolved modulename: std
_rustx.rs:1 
            ^
_rustx.rs:1:0: 1:0 error: unresolved modulename: std
_rustx.rs:1 
            ^
error: aborting due to previous errors

This is very uncool.

Shebangs

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.