File size: 1,659 Bytes
d5bfab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Content of the `rust_project` dir

LODA Rust is written in the language Rust.

For development I use [VSCode](https://github.com/microsoft/vscode).

## Run tests

Before start doing development on LODA-RUST, make sure the tests runs without failures.

```
PROMPT> cargo test
```


## Run with debug output

LODA-RUST outputs things to console that are hidden by default.

In order to see it, prefix with `RUST_LOG=DEBUG`.

```
PROMPT> RUST_LOG=DEBUG cargo run -- eval A40
   Compiling loda-rust-web v0.1.0 (/Users/homedir/git/loda-rust/rust_project/loda-rust-web)
   Compiling loda-rust-cli v0.1.0 (/Users/homedir/git/loda-rust/rust_project/loda-rust-cli)
    Finished dev [unoptimized + debuginfo] target(s) in 6.43s
     Running `target/debug/loda-rust eval A40`
2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71
[1999-12-29T09:59:01Z DEBUG loda_rust::subcommand_evaluate] steps: 20390
[1999-12-29T09:59:01Z DEBUG loda_rust::subcommand_evaluate] cache: hit:190 miss:111,0
[1999-12-29T09:59:01Z DEBUG loda_rust::subcommand_evaluate] elapsed: 12 ms
```


## Run with backtrace enabled

This is useful if there is a crash.

```
PROMPT> RUST_BACKTRACE=1 cargo run -- eval A79
```


## Compile in release mode

```
PROMPT> cargo build -p loda-rust-cli --release
PROMPT> ./target/release/loda-rust eval A40
2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71
PROMPT>
```

## Deploy for web

```
PROMPT> cd loda-rust-web
PROMPT> ./build.sh
```

Open `index.html` in the browser.


## Verify integration with loda-cpp is working

```
PROMPT> cargo run -- test-integration-with-lodacpp
test integration with lodacpp: Completed successfully.
PROMPT>
```