Andrea Ciliberti
70d5ec1843
Undo wrong changes
1 year ago
Andrea Ciliberti
4560716fcc
Fix >= version check
1 year ago
Andrea Ciliberti
dd5ed8a480
Fix new Cargo.toml
1 year ago
Andrea Ciliberti
a0fcbbc57e
Fixed --help docs
2 years ago
Andrea Ciliberti
9b483a8589
Rebased changes
2 years ago
Andrea Ciliberti
eaa93126f4
Merge different commands under a common infrastructure
2 years ago
Andrea Ciliberti
b899ff9d7e
Remove useless RUSTFLAGS changes
2 years ago
Andrea Ciliberti
9b6b79dff2
Callback refactor and cargo-new
2 years ago
Ian Chamberlain
3e7665fb63
Slightly improve doctest output
...
Warn user that no 3dsx will be built in this case, and use "human"
formatting so that we get colored rustc output (since we don't need to
parse the JSON output in this case anyway).
2 years ago
Ian Chamberlain
e8535a130d
Add limited support for `cargo 3ds test --doc`
2 years ago
Ian Chamberlain
329cb00d74
Documentation improvements and extra test case
2 years ago
Ian Chamberlain
dd8ae47296
Plumb through 3dslink args for run + test commands
2 years ago
Ian Chamberlain
dbf1595def
Add plumbing for new commands to running cargo
2 years ago
Ian Chamberlain
583fc67fc6
Update docstrings and arg parsing
...
Also add the most basic `debug_assert` test.
2 years ago
Ian Chamberlain
c2560622e8
Fix some build errors for testing
2 years ago
Ian Chamberlain
cef69644e6
Upgrade to clap4, add extra args and help strings
2 years ago
Mark Drobnak
cb3a9a19ff
Set build-std flag before trailing arguments
2 years ago
Mark Drobnak
7e99e1a9a5
Move build-std argument after the subcommand to fix clippy
...
This fixes `cargo +nightly 3ds clippy`. See this thread:
https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/-Zbuild-std.20and.20clippy.3F/near/290622458
2 years ago
Steve Cook
c7b6482f9c
Remove Display trait
...
Inline match command to subcommand for make_cargo_build_command
2 years ago
Steve Cook
84ac10371b
Cargo fmt
2 years ago
Steve Cook
1a562d0c1a
Build and not run under the hood when calling `cargo 3ds run`
...
Cargo fmt
2 years ago
Steve Cook
eb1d4345b7
Fix logic for when to link
2 years ago
Steve Cook
8d350a8c6b
Only link for `run` and `test` subcommands.
2 years ago
Steve Cook
9aa632622c
Remove fully qualified derive
2 years ago
Steve Cook
4c5929715c
Move command struct and parser to command.rs
2 years ago
Steve Cook
ef6a2f6724
Revert println! to eprintln!
2 years ago
Steve Cook
8eac835c4c
Add comments
2 years ago
Steve Cook
06bdf9f289
Move should_link and message_format to separate functions
2 years ago
Steve Cook
239556abf8
Revert to original cargo usage
...
Re-add TeeReader comment
Remove debugging line
2 years ago
Steve Cook
51917f8fcf
Add AllowLeadingHyphen
2 years ago
Steve Cook
f05b57f5ac
Use ValueEnum over deprecated ArgEnum
2 years ago
Steve Cook
11855472df
Fix another indexing issue
2 years ago
Steve Cook
3cb1169dcb
Fix message format parsing
2 years ago
Steve Cook
cc03d78ba5
Initial use of clap
2 years ago
Mateo Cabanal
880661157c
added error messages, replacing unwrap()'s with expect()'s
3 years ago
Andrea Ciliberti
4cd3055780
Bump minimum rustc toolchain
3 years ago
Mark Drobnak
40afa13ba0
Use the pre-built std if available in sysroot
3 years ago
Andrea Ciliberti
402e7af28a
Use parser crate rather than env var
3 years ago
Ian Chamberlain
8023bfb28c
Parse message-format up front and use TeeReader
...
We can still parse the JSON output, even if
Also:
- remove some unused deps.
- make sure we use eprintln so it doesn't interfere with any JSON output
the user might want
3 years ago
Ian Chamberlain
935594b309
Allow passthrough when message-format is specified
3 years ago
Andrea Ciliberti
2bd2617ea2
Renamed link command to be used with run
3 years ago
Ian Chamberlain
b7452b4e54
Add support for `cargo test` ( #11 )
...
* Use cargo metadata to get exe paths
Include support for "test" subcommand
* Fix accidentally using wrong smdh file
* Update help text for `test`
`--release` is no longer special and just works like any other cargo
arg, so might as well take it out of the help text.
* Use cargo's exit code if possible
* Address PR comments
* Use PathBuf and more consistent Path methods
`.display()` for display, `.to_string_lossy()` for passing args. This
isn't perfect, but we'll just assume no UTF-8 pathnames for now.
3 years ago
AzureMarker
6ca3f96a39
Return an error if the non-default RomFS directory isn't found
3 years ago
AzureMarker
2813bbc21f
Read the RomFS path from Cargo.toml
3 years ago
AzureMarker
ee8eec9338
Fix romfs error "Cannot open dir"
...
The parentheses weren't understood by 3dsxtool. Normally they're just a
shell thing anyway, and aren't needed when we're directly constructing
a process's argument array.
3 years ago
AzureMarker
cf3717470d
Fix the link command
3 years ago
AzureMarker
6e78e5c27e
Allow other Cargo commands (like check and clippy)
...
This makes it easier to switch between check/clippy and build.
Otherwise, unless you use the same exact RUSTFLAGS and parameters,
Cargo will rebuild everything (throwing away the build cache).
3 years ago
Ian Chamberlain
8b7acacb61
Add --help and print usage in main
3 years ago
AzureMarker
cdaef21846
Remove an unnecessary whitespace
3 years ago
AzureMarker
779b79dcd6
Fix RUSTFLAGS not getting passed through
3 years ago