Releases: qryxip/cargo-equip
v0.20.1
v0.20.0
Added
-
Added
--exclude-atcoder-202301-crates
. (#197)--exclude-atcoder-202301-crates Alias for `--exclude {crates available on AtCoder 202301}`
-
Added
--toolchain-for-proc-macro-srv
. (#195)--toolchain-for-proc-macro-srv <TOOLCHAIN> Toolchain for expanding procedural macros
Changed
-
Updated the embedded Rust Analyzer to
2023-07-31
(0.0.166
). (#195)For Rust <1.64,
--toolchain-for-proc-macro-srv
is required for macro expansion.❯ cargo +1.42.0 equip 2>&1 | tail -n 1 Rust ≧1.64.0 is required for expanding procedural macros. Specify one with `--toolchain-for-proc-macro-srv`
This update should fix the issue where macro expansion segfaults.
-
Renamed
--toolchain
to--toolchain-for-udeps
. (#195)❯ cargo equip --toolchain nightly warning: `--toolchain` was renamed to `--toolchain-for-udeps`
-
cargo-equip now warns for
resolver = "2"
andedition = "2015"
. (#196)Note that both has been unsupported.
warning: Currently cargo-equip only support Feature Resovler v1, and may go search more crates than real Cargo does. Please watch https://github.com/qryxip/cargo-equip/issues/94
warning: Rust 2015 is unsupported
Fixed
-
Updated prettytable. (#193 by @ichyo)
Now cargo-equip built with recent Rust works.
-
Adapted the new reserving syntax in Rust 2021 when minifying. (qryxip/rustminify#7 by @mizar, #198).
This fix also affects Rust 2018. The output might be few characters longer.
v0.19.0
Added
- Ignores workspace members when checking licenses. (#184)
Changed
-
Embedded rust-analyzer for expanding procedural macros. (#183)
Previously, cargo-equip downloaded rust-analyzer(.exe) from GitHub Releases and used it.
-
Requires additional 1.48+ toolchain for compiling proc-macro crates when cargo-equip is used for an old toolchain such as 1.42. (#183)
Previously, 1.47 was compatible.
Fixed
v0.18.1
Added
-
(also applied to the previous versions unless
--locked
) Updated syn to v1.0.83.- Now accepts some nightly-only syntaxes
- Now accepts trailing
+
in TypeParamBounds.
Fixed
v0.18.0
Added
-
Added
--mod-path <MODULE_PATH>
option. (#159)+ --mod-path <MODULE_PATH> Expand the libraries to the module [default: crate::__cargo_equip]
-
Added
--mine <DOMAIN_AND_USERNAME>...
option. (#169)+ --mine <DOMAIN_AND_USERNAME>... + Do not include license and copyright notices for the users. + + Supported formats: + * github.com/{username} + * gitlab.com/{username}
Changed
-
Enabled running for a
lib
crate. (#156)Now you can easily produce standalone Rust source files like
my_library.rs
.❯ cargo metadata --format-version 1 | jq -r .resolve.root | awk '{ print $1, $2 }' proconio 0.4.3 ❯ cargo equip --minify libs --remove docs -o ./proconio.rs
-
Changed potition of the generated doc comment. (#161)
-//! # Bundled libraries -//! ⋮ use __cargo_equip::prelude::*; fn main() {} +/// # Bundled libraries +/// ⋮ #[allow(unused)] mod __cargo_equip { // ⋮ }
-
cargo-equip no longer uses
package.authors
to skip Copyright and License Notices. (#164)Instead, add
--mine github.com/your-username
to the arguments. -
Now uses rust-analyzer
2021-07-12
for Rust 1.47 and2021-08-09
for Rust 1.48+. (#163)
Fixed
-
#[macro_export]
ed macros will remain in textual scope. (#170)#[macro_export] -macro_rules! hello { +macro_rules! /*hello*/__cargo_equip_macro_lib_hello { () => { ::std::println!("Hello!") }; } +macro_rules!hello{($($tt:tt)*)=>(crate::__cargo_equip_macro_lib_hello!{$($tt)*})}
-
Improved the minification function. (#153, #157)
-let _=| |(); +let _=||();
-
(also applied to the previous versions unless
--locked
) Updated syn to v1.0.74. (#155) -
Enabled reading license files from
git
/path
package sources. (#156)Previously cargo-equip reaches a
todo!
. -
Now handles
path
dependencies correctly when checking an output. (#156, #166)
v0.17.0
Changed
-
Improved the help. (#143)
Now you can read the detailed help with
--help
whilecargo equip -h
still prints a short and concise overview. -
Changed the format. (#144)
- Moved
__bundled
to__cargo_equip::crates
. - Moved
__bundled::*::__macros
to__cargo_equip::macros
. - Now creates
__cargo_equip::prelude
and glob-uses it instead of declaring__prelude_for_main_crate!
. - Unified
__bundled::*::{__external_local_inner_macros, __pseudo_extern_prelude}
into__cargo_equip::preludes
.
//! # Bundled libraries //! ︙ pub use __cargo_equip::prelude::*; // ︙ // The following code was expanded by `cargo-equip`. mod __cargo_equip { pub(crate) mod crates {/* … */} pub(crate) mod macros {/* … */} pub(crate) mod prelude {/* … */} mod preludes {/* … */} } #[cfg_attr(any(), rustfmt::skip)] const _: () = { // ︙ };
- Moved
-
Updated rust-analyzer to
2021-06-28
. (#145)
v0.16.0
Changed
-
--resolve-cfgs
--rustfmt
--check
by default. (#139)Instead, added
--no-resolve-cfgs
,--no-rustfmt
, and--no-check
.❯ cargo-equip --resolve-cfgs --rustfmt --check warning: `--resolve-cfgs` is deprecated. `#[cfg(..)]`s are resolved by default warning: `--rustfmt` is deprecated. the output is formatted by default warning: `--check` is deprecated. the output is checked by default
-
Removed the warning message for
pub(crate)
in libraries. (#138) -
Updated
--exclude-{atcoder, codingame}-crates
. (#140)Added
…#proconio:0.3.8
to--exclude-atcoder-crates
. -
Updated rust-analyzer to
2021-06-21
. (#141)
v0.15.0
Changed
-
cargo-equip now inserts
#[allow(unused_imports)]
for only seemingly procedural macros.use proconio::{fastout, input};
↓
use proconio::{/*fastout,*/ input}; #[allow(unused_imports)] use proconio::fastout;
v0.14.0
Added
-
Scopes for macros are now preserved. (#126)
Now you can
use
macros anywhere.use proconio::input; fn main() { input! { n: usize, } }
-
Dummy macros are now expanded for
proc-macro
crates. (#126)Now you can also
use
procedural macros.use proconio::fastout; #[fastout] fn main() { println!("Hi"); }
-
Now
#[[warn/deny/forbid](missing-(crate-level-)docs)]
attributes are removed when--remove docs
is enabled. (#126)Now you can remove doc comments from smallvec.
-
Modules in main crates are now supported. (#129)
mod sub { use smallvec::{smallvec, SmallVec}; pub(crate) fn f() { let _: SmallVec<[(); 0]> = smallvec![]; } }
Changed
-
Dropped the support for Rust 2015. (#126)
-
#[allow(unused_imports)]
will be always inserted. (#126) -
Updated rust-analyzer to
2021-05-31
. (#130)
Fixed
-
Fixed order of
#[macro_exported]
macros. (#126) -
Fixed a problem where
attr
s for attribute macros contain parentheses. (#130)#[memoise(n <= 10)] ^ ^
v0.13.1
Fixed
-
Enabled minifying
1. ..x
correctly.