aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2015-03-04 11:25:21 -0600
committerJoel Martin <github@martintribe.org>2015-03-04 11:25:21 -0600
commit434516e0d172904e06b05f6dee83ce2e7859b950 (patch)
tree78f385c26fe410d77405ac2fd979d2f794701ee9
parent6cee207674783a1707c3e3c4dcec575112ba1c81 (diff)
downloadmal-434516e0d172904e06b05f6dee83ce2e7859b950.tar.gz
mal-434516e0d172904e06b05f6dee83ce2e7859b950.zip
Rust: build with --release. 10X performance boost!
-rw-r--r--Makefile2
-rw-r--r--README.md2
-rw-r--r--rust/Makefile8
3 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index eae6ee6..5409c0e 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,7 @@ python_STEP_TO_PROG = python/$($(1)).py
r_STEP_TO_PROG = r/$($(1)).r
racket_STEP_TO_PROG = racket/$($(1)).rkt
ruby_STEP_TO_PROG = ruby/$($(1)).rb
-rust_STEP_TO_PROG = rust/target/$($(1))
+rust_STEP_TO_PROG = rust/target/release/$($(1))
scala_STEP_TO_PROG = scala/$($(1)).scala
vb_STEP_TO_PROG = vb/$($(1)).exe
nim_STEP_TO_PROG = nim/$($(1))
diff --git a/README.md b/README.md
index 0602c01..4e3a022 100644
--- a/README.md
+++ b/README.md
@@ -317,7 +317,7 @@ tool (cargo) to build.
cd rust
# Need patched pcre lib (should be temporary)
git clone https://github.com/kanaka/rust-pcre cadencemarseille-pcre
-cargo build
+cargo build --release
./target/stepX_YYY
```
diff --git a/rust/Makefile b/rust/Makefile
index da8a6c6..fa1edc9 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -11,18 +11,18 @@ SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
SRCS = step1_read_print.rs step2_eval.rs step3_env.rs \
step4_if_fn_do.rs step5_tco.rs step6_file.rs step7_quote.rs \
step8_macros.rs step9_try.rs stepA_mal.rs
-BINS = $(SRCS:%.rs=target/%)
+BINS = $(SRCS:%.rs=target/release/%)
#####################
all: mal
mal: ${SOURCES_BASE} $(word $(words ${SOURCES_LISP}),${SOURCES_LISP})
- cargo build
+ cargo build --release
cp $(word $(words ${BINS}),${BINS}) $@
-#$(BINS): target/%: src/%.rs
-# cargo build $*
+#$(BINS): target/release/%: src/%.rs
+# cargo build --release $*
clean:
cargo clean