From e0e0a05331a791fa8cec700b5663986c79262dd0 Mon Sep 17 00:00:00 2001 From: caelansar <819711623@qq.com> Date: Wed, 15 May 2024 06:03:18 +0800 Subject: [PATCH] doc: readme --- Makefile | 6 ++++++ README.md | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1302615..0d8d422 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,12 @@ build: build_eval: cargo build --release --bin caescript --features=build-binary +install: + cargo install --features=build-binary,vm --path . + +install_eval: + cargo install --features=build-binary --path . + .PHONY: test test: cargo test --all-features diff --git a/README.md b/README.md index e8a29ca..53d2401 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ reading through [Writing An Interpreter In Go](https://interpreterbook.com/) and ### Build from source code - Build release ``` -$ cargo build --release --bin caescript +$ make install_eval ``` - Build release using the Compiler implementation ``` -$ cargo build --release --features=vm --bin caescript +$ make install ``` - Running the REPL ```bash -$ ./caescript +$ caescript ``` - Running the Interpreter/Compiler ```bash -$ ./caescript [vm/eval] examples/hello.cae +$ caescript [vm/eval] examples/hello.cae ``` ### With online playground