Skip to content

Releases: fanzeyi/cargo-play

v0.5.0

20 Feb 06:01
63447da
Compare
Choose a tag to compare

Changes

  • cargo-play is now able to accept code from standard input (thanks to @octaltree)
  • A new --expand flag to expand macros in your code (thanks to @guswynn)
  • --mode flag is no longer constrained to test, check and expand. You can use this flag to override the cargo subcommand cargo-play runs (thanks to @guswynn)
  • Updated dependencies

0.4.2

26 Jul 23:05
Compare
Choose a tag to compare

New Flags

  • --mode <test|check>, --test and --check are added to control which Cargo subcommand you want to run. With these flags you can run code guarded with cfg(test) or simply check errors with cargo check. (Thanks @rochacbruno)

0.4.1

15 Jun 05:10
Compare
Choose a tag to compare

New Flags

  • --quiet and --verbose are added to control Cargo verbosity settings. They will be passed into Cargo unconditionally.

Bugfixes

  • base64 encoding is now replaced by base58 to prevent accidental invalid Cargo project name. (Thanks @sunshowers)

0.4.0

21 Aug 05:47
Compare
Choose a tag to compare

New Features

  • --infer lets cargo-play to infer the third-party dependencies used in the source code. No more dull dependency specifications. However, with two catches:
    • Under the hood cargo-play finds all the use statements in your code. That means if you directly use some external crates, cargo-play will not be able to recognize such dependency.
    • For the same reason, if you use use statements to rename things, cargo-play would incorrectly recognize these as dependencies.
  • --save=<PATH> generates a Cargo project at <PATH> based on the files passed to cargo-play.
  • You can now pass flags to your program run by cargo-play. Simply put any flags after -- and these flags will be passed to your program. For example, running cargo play cmd.rs -- --help will be running your program with --help.
  • --cargo-options=<OPTIONS> allows you to pass flags to the underlying Cargo command cargo-play invokes.
  • --release allows you to run your program in release mode.

Bugfix

  • cargo-play is now able to skip shebang and empty lines at the beginning of files correctly. Thanks @norcalli.
  • cargo-play is now able to generate Cargo.toml correctly when there is mixed git dependency starting with "d". Thanks @reitermarkus.

v0.3.0

21 Jun 06:11
Compare
Choose a tag to compare

New features:

  • Added support for toolchain selecting (+nightly / +beta / +stable, rustup is required).
  • Added -c/--clean option to delete built binaries from previous runs.
  • Make sure the different order of same set of input files still share the same temporary cargo folder.