diff --git a/DEVEL b/DEVEL index 722c5da..f340553 100644 --- a/DEVEL +++ b/DEVEL @@ -72,6 +72,8 @@ The target platform is indicated by its backend index, as given in table 1. +----------------------+------------------+ | lang_c | 2 | +----------------------+------------------+ + | lang_rust | 3 | + +----------------------+------------------+ | lang_go | 4 | +----------------------+------------------+ | lang_ruby | 6 | diff --git a/README.md b/README.md index 7f9a8d2..8452462 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Awib is a brainfuck compiler entirely written in brainfuck. as brainfuck, Tcl, C and bash - Awib has 6 separate backends and is capable of compiling brainfuck source code to Linux executables (i386) and - five programming languages: C, Tcl, Go, Ruby and Java + five programming languages: C, Tcl, Go, Ruby, Java and Rust Usage ----- @@ -30,6 +30,8 @@ Awib will then produce output accordingly. lang_go - Go code lang_tcl - Tcl code lang_java - Java code + lang_rust - Rust code + For instance, the following input would produce an executable hello world-program for Linux: diff --git a/systest/run.sh b/systest/run.sh index f770c74..f93ba28 100755 --- a/systest/run.sh +++ b/systest/run.sh @@ -2,7 +2,7 @@ set -e -ALL_TARGETS="lang_c 386_linux lang_ruby lang_go lang_tcl lang_java" +ALL_TARGETS="lang_c 386_linux lang_ruby lang_go lang_tcl lang_java lang_rust" ALL_TEST_CASES=$(ls -1Sr *.b | cut -f1 -d.|xargs) AWIB_BUILD="../awib.b" ALL_METHODS="bfint gcc tclsh bash" @@ -173,6 +173,11 @@ java Bf EOF chmod +x $out ;; + + lang_rust) + mv $out $out.rs + rustc $out.rs -o $out + ;; esac return 0