Skip to content

Commit f7c0d64

Browse files
committed
Update usage instructions to reccomend pre-compiled binaries
1 parent d51cb6b commit f7c0d64

1 file changed

Lines changed: 24 additions & 14 deletions

File tree

README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,32 @@ It contains three tools:
1212

1313
## Usage
1414

15-
### Running in CodeSandbox
15+
### Reccomended: Pre-compiled binaries
16+
17+
Pre-compiled binaries (executibles) are available for [common Windows and Linux platforms](#supported-platforms). Download them from the **[releases page](https://github.com/RandomSearch18/rusty_man_computer/releases/latest)**.
18+
19+
Then you can run the examples below (adapting the binary name to match the name of the file you've downloaded). For example:
20+
21+
```bash
22+
rusty-man-computer-0.4.0-x86_64-pc-windows-gnu.exe --ram demos/add.bin
23+
```
24+
25+
I'd suggest renaming the binary file to `rusty-man-computer` or `rusty-man-computer.exe` (on Windows) to make things easier to type.
26+
27+
### Try it online: Run in CodeSandbox
1628

1729
You can try Rusty-Man Computer in your browser by visiting the **[💻 CodeSandbox demo](https://codesandbox.io/p/github/RandomSearch18/rusty_man_computer/)**.
1830

1931
If you see "Setup in progress" in the top left of the CodeSandbox UI, it's building a microVM image for you. You'll have to wait for this to complete (you can click on it to see progress). You _might_ have to refresh after it's finished building.
2032

2133
Once CodeSandbox has loaded, press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>\`</kbd> to open a new terminal, where you can use `cargo run` to run the [demo programs](#running-the-demo-programs) below :D
2234

23-
### Pre-compiled binaries
24-
25-
At the moment, `cargo run` is the recommended way to run the app, but pre-compiled binaries are also available for [some platforms](#supported-platforms). Download them from the **[releases page](https://github.com/RandomSearch18/rusty_man_computer/releases/latest)**.
35+
### Alternative: Run using Cargo
2636

27-
Then, you can directly run the binary, following the examples below, e.g.
37+
If you have [Rust installed](https://rust-lang.org/tools/install/), you can run the programs by cloning this repository and using `cargo run`, e.g.
2838

29-
```sh
30-
rusty-man-computer --ram demos/add.bin
39+
```bash
40+
cargo run --bin rusty_man_computer -- demos/add.bin
3141
```
3242

3343
### Running the demo programs
@@ -39,7 +49,7 @@ Credit: Peter L Higginson, <https://peterhigginson.co.uk/lmc/>
3949
> Output the sum of two numbers
4050
4151
```bash
42-
cargo run --bin rusty_man_computer -- --ram demos/add.bin
52+
rusty-man-computer --ram demos/add.bin
4353
```
4454

4555
#### Addition and subtraction
@@ -51,23 +61,23 @@ Credit: Peter L Higginson, <https://peterhigginson.co.uk/lmc/>
5161
> and the third minus the first
5262
5363
```bash
54-
cargo run --bin rusty_man_computer -- --ram demos/add-subtract.bin
64+
rusty-man-computer --ram demos/add-subtract.bin
5565
```
5666

5767
#### Basic ASCII characters
5868

5969
Credit: Peter L Higginson, <https://peterhigginson.co.uk/lmc/>
6070

6171
```bash
62-
cargo run --bin rusty_man_computer -- --ram demos/ascii.bin
72+
rusty-man-computer --ram demos/ascii.bin
6373
```
6474

6575
#### Basic ASCII character table
6676

6777
Credit: Peter L Higginson, <https://peterhigginson.co.uk/lmc/>
6878

6979
```bash
70-
cargo run --bin rusty_man_computer -- --ram demos/ascii_table.bin
80+
rusty-man-computer --ram demos/ascii_table.bin
7181
```
7282

7383
#### Factorial
@@ -77,21 +87,21 @@ Credit: 101computing.net, <https://www.101computing.net/LMC/>
7787
Computes the factorial of the given input number. Note that above $6!$, the output will be wrong due to 999 being the highest representable number.
7888

7989
```bash
80-
cargo run --bin rusty_man_computer -- --ram demos/factorial.bin
90+
rusty-man-computer --ram demos/factorial.bin
8191
```
8292

8393
### Running your own programs
8494

8595
If you have a program written in LMC assembly, you can assemble it to a Rusty-Man Computer machine code file using the `rmc_assemble` binary.
8696

8797
```bash
88-
cargo run --bin rmc_assemble -- my_program.lmc --output my_program.bin
98+
rmc_assemble my_program.lmc --output my_program.bin
8999
```
90100

91101
Then you can run the program in a similar way to the examples above, e.g.
92102

93103
```bash
94-
cargo run --bin rusty_man_computer -- --ram my_program.bin
104+
rusty-man-computer --ram my_program.bin
95105
```
96106

97107
### Command-line arguments

0 commit comments

Comments
 (0)