Build
As another useful subcommand, it helps us to build the final binary and generate .d.ts. Standard command will be:
shell
ohrs buildIt supports some special options.
| Options | description | type | default |
|---|---|---|---|
| release | build mode,if it be set with true, project will build with release mode | boolean | false |
| dist | The final binary's folder | string | dist |
| strip | Use llvm-strip to reduce the size of the binary files. Set the mode to true if it's in release mode | boolean | true |
Usage
Here are some examples to use them.
--release
shell
ohrs build --releaseIf we use --release, project will build with release mode.
--compact
shell
ohrs build --compactIf we use --compact, the final folder will be:

All the final binary will in a same folder.
--dist new_folder
shell
cargo build --dist new_folderNow, the final project structure will be:

--strip
shell
# enabled
cargo build --strip
# disabled
cargo build --strip=false