Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
whs committed Feb 8, 2016
1 parent 1e09e95 commit f02fe89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ stopwatch = "0.0.6"
lto = true

[features]
default = ["server", "color"]
default = ["color"]
dump_data = []
wait_on_exit = []
server = []
color = []
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@

Project from Software Pattern class.

## Running
## Running server

(Make sure you have [Rust](https://www.rust-lang.org/downloads.html) installed)

```
$ cargo run --release SyllableDB-V1.dat
$ cargo run --bin thaiengine --release SyllableDB-V1.dat
```

(Syllable database can be obtained from the class Facebook group)

Optional features:

- `assertion`: Show time used to perform certain operations
- `dump_data`: Print data while loading/searching
- `wait_on_exit`: Don't exit, instead wait for long time
- `interactive`: Interactive build: ask for file to read, ask for search queries
- `color` (default): Use colored log. Disable if your platform have problem rendering it
- Set `RUST_LOG=debug` to view more logs

To enable features:

```
$ cargo run --features="assertion dump_data" SyllableDB-V1.dat
$ cargo run --features="dump_data" --bin thaiengine --release SyllableDB-V1.dat
```

**Note**: Running without `--release` will use another code path with assertions, resulting in slower program.

## Running client

```
$ cargo run --bin client --release
```

0 comments on commit f02fe89

Please sign in to comment.