cargo-swell

Crates.iocargo-swell
lib.rscargo-swell
version0.1.1
created_at2025-10-12 19:08:50.5318+00
updated_at2025-10-12 19:11:29.39581+00
description`cargo expand` without automatically derived items
homepagehttps://github.com/sampathsris/cargo-swell
repositoryhttps://github.com/sampathsris/cargo-swell
max_upload_size
id1879531
size74,237
Sampath Sitinamaluwa (sampathsris)

documentation

https://github.com/sampathsris/cargo-swell

README

cargo swell

cargo expand without automatically derived items.

Here's what it does:

  1. Call cargo expand
  2. Parse the output with syn and recursively find #[automatically_derived] attributes and remove the associated items.
  3. Print the remaining output.

That's it!

Motivation

It's very hard to find what you're looking for in cargo expand's output, when it gets cluttered with #[automatically_derived] items (e.g.: #[derive(Debug)]). This is an extremely crude solution to that problem.

Installation

cargo install cargo-swell

Usage

cargo swell

Any command line options to cargo swell gets passed to cargo expand as is (with the exception of --color <WHEN>).

Limitations

--theme option (and therefore --themes) is not ignored due to the way this solution is written. The coloring is done using bat's default theme.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 0

cargo fmt