Skip to content

Commit

Permalink
Reformat feature flag section of README
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhanLiin committed Jul 13, 2024
1 parent bd43ef1 commit ff039a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,17 @@ For more information on custom fields, see `Config::custom_field` in `micropb-ge
## Feature Flags

- **`encode`**: Enable support for encoding and computing the size of messages. If disabled, the generator should be configured to not generate encoding logic via `Generator::encode_decode`. Enabled by default.

- **`decode`**: Enable support for decoding messages. If disabled, the generator should be configured to not generate decoding logic via `Generator::encode_decode`. Enabled by default.

- **`enable-64bit`**: Enable 64-bit integer operations. If disabled, then 64-bit fields such as `int64` or `sint64` should have `Config::int_size` set to 32 bits or less. Has no effect on `double` fields. Enabled by default.

- **`alloc`**: Implements container traits on `Vec`, `String`, and `BTreeMap` from [`alloc`](https://doc.rust-lang.org/alloc), allowing them to be used as container fields. Corresponds with `Generator::use_container_alloc` from `micropb-gen`. Also implements `PbWrite` on `Vec`.

- **`std`**: Enables standard library and the `alloc` feature.

- **`container-heapless`**: Implements container traits on `Vec`, `String`, and `IndexMap` from [`heapless`](https://docs.rs/heapless/latest/heapless), allowing them to be used as container fields. Corresponds with `Generator::use_container_heapless` from `micropb-gen`. Also implements `PbWrite` on `Vec`.

- **`container-arrayvec`**: Implements container traits on `ArrayVec` and `ArrayString` from [`arrayvec`](https://docs.rs/arrayvec/latest/arrayvec), allowing them to be used as container fields. Corresponds with `Generator::use_container_arrayvec` from `micropb-gen`. Also implements `PbWrite` on `ArrayVec`.

## MSRV
Expand Down

0 comments on commit ff039a2

Please sign in to comment.