New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more arguments and use clap to parse the arguments #115

Closed
tomaka opened this Issue Oct 23, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@tomaka
Copy link
Owner

tomaka commented Oct 23, 2016

Difficulty level: easy if you're familiar with CLI libraries/medium otherwise.

Lots of issues right now with this crate are the fact that it has a clumsy CLI. Instead of parsing arguments manually, we should probably use an existing library. I like clap but am not against using another one (as long as it is mature enough).

  • The CLI interface of cargo-apk should mimic the one of regular cargo, notably --help and the list of subcommands.
  • The cargo apk build subcommand should mimic cargo build.
  • The cargo apk install subcommand should mimic cargo build.
  • Add cargo apk run that mimics cargo run and starts the application on the device (see this link).
  • The subcommands should return an error if we try to build a library.
  • Add an optional -s flag to install and run that is passed to adb, so that the user can choose which device to install to if there are multiple ones.

The internals of this crate work by calling cargo rustc. In order to mimic cargo, maybe the best thing to do is simply pass all arguments to cargo, except for --target (which is handled internally by this crate).

@tomaka tomaka added the enhancement label Oct 23, 2016

@tomaka tomaka changed the title Use clap to parse the arguments Add more arguments and use clap to parse the arguments Dec 27, 2016

@tomaka tomaka added the help wanted label Dec 27, 2016

@tomaka tomaka referenced this issue Jan 13, 2017

Merged

Adds --bin flag. #121

@torkleyy

This comment has been minimized.

Copy link

torkleyy commented Apr 26, 2017

I can do that, won't be able to start until next week, though.

@tomaka

This comment has been minimized.

Copy link
Owner

tomaka commented Apr 26, 2017

Oh, in fact I started doing that just a few days ago: #133
I forgot to link it here.

@tomaka

This comment has been minimized.

Copy link
Owner

tomaka commented Jul 22, 2017

#133 is now merged.

@tomaka tomaka closed this Jul 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment