forked from djmcgill/form
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update error handling to use Failure instead of Error-Chain, update d…
…ocumentation, update dependencies
- Loading branch information
Showing
6 changed files
with
252 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
/target/ | ||
**/*.rs.bk | ||
.idea/ | ||
*.iml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
# Form | ||
 | ||
|
||
A library for splitting apart a large file with multiple modules into the idiomatic rust directory structure, intended for use with svd2rust. | ||
Creates a lib.rs as well as a subdirectory structure in the target directory. | ||
It's advised (but not necessary) to use scalafmt afterwards. | ||
Usage: | ||
Creates a lib.rs as well as a subdirectory structure in the target directory. It does NOT create the cargo project or the cargo manifest file. | ||
|
||
It's advised (but not necessary) to use rustfmt afterwards. | ||
## Usage: | ||
Arguments: | ||
``` | ||
-i, --input FILE input file to read instead of stdin | ||
-i, --input FILE OPTIONAL: input file to read, defaults to stdin | ||
-o, --outdir DIR set output directory | ||
-h, --help print this help menu | ||
``` | ||
|
||
Does not create the cargo project or the cargo manifest file. | ||
|
||
TODO: | ||
- better error handling | ||
Intended usage: | ||
```bash | ||
svd2rust -i FOO.svd | form -o ~/private/code/form/test/src | ||
``` | ||
|
||
current usage: | ||
RUST_LOG=form=debug RUST_BACKTRACE=1 cargo run --release -- -i ~/private/code/form/resources/full-lib.rs -f -o ~/private/code/form/test/src | ||
Advanced usage: | ||
```bash | ||
cargo install form | ||
export RUST_LOG=form=debug | ||
export RUST_BACKTRACE=1 | ||
form -i ~/private/code/form/resources/full-lib.rs -o ~/private/code/form/test/src | ||
``` |
Oops, something went wrong.