Skip to content

Commit bb90132

Browse files
committed
docs(book): improve overview on CLI inputs (#1612)
1 parent 36b9429 commit bb90132

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

book/src/writing-apps/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ For more information on both commands, see the [build](./build.md) docs.
2626

2727
### Inputs
2828

29-
The `--input` field needs to either be a single hex string or a file path to a json file that contains the key `input` and an array of hex strings. Note that if your hex string represents a single number, it should be written in little-endian format (as this is what the VM expects). Also note that if you need to provide multiple input streams, you have to use the file path option.
29+
The `--input` field needs to either be a single hex string or a file path to a json file that contains the key `input` and an array of hex strings. Also note that if you need to provide multiple input streams, you have to use the file path option.
3030
Each hex string (either in the file or as the direct input) is either:
3131

32-
- Hex string of bytes, which is prefixed with 0x01
33-
- Hex string of native field elements (represented as u32, little endian), prefixed with 0x02
32+
- Hex string of bytes, which is prefixed with `0x01`
33+
- Hex string of native field elements (represented as u32, little endian), prefixed with `0x02`
3434

35-
To see how more complex inputs can be converted into a VM-readable format, see the **Using StdIn** section of the [SDK](../advanced-usage/sdk.md) doc.
35+
If you are providing input for a struct of type `T` that will be deserialized by the `openvm::io::read()` function, then the corresponding hex string should be prefixed by `0x01` followed by the serialization of `T` into bytes according to `openvm::serde::to_vec`. The serialization will serialize primitive types (e.g., `u8, u16, u32, u64`) into little-endian bytes. All serialized bytes are zero-padded to a multiple of `4` byte length. For more details on how to serialize complex types into a VM-readable format, see the **Using StdIn** section of the [SDK](../advanced-usage/sdk.md#using-stdin) doc.
3636

3737
## Generating a Proof
3838

@@ -72,7 +72,7 @@ To do (a), you need to run the following command. If you've run it previously on
7272
cargo openvm setup
7373
```
7474

75-
> ⚠️ **WARNING**
75+
> ⚠️ **WARNING**
7676
> This command requires very large amounts of computation and memory (~200 GB).
7777
7878
To do (b), you simply need to replace `app` in `cargo openvm prove` and `cargo openvm verify` as such:

0 commit comments

Comments
 (0)