Coder Social home page Coder Social logo

cargo-bloat-action's Introduction

Cargo Bloat Action ๐Ÿš€

Analyse and track your Rust project binary size over time. This action runs on every pull request and gives you a breakdown of your total binary size, how much each crate contributes to that size and a list of changes to your dependency tree.

Table of Contents

Example Workflow

Check out cargo-bloat-example for a full example project. For an example pull request, see orf/cargo-bloat-example#1.

on: # rebuild any PRs and main branch changes
  pull_request:
  push:
    branches:
      - master

name: bloat

jobs:
  cargo_bloat:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - name: Run cargo bloat
        uses: orf/cargo-bloat-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Options

  • by_function - Display per-function bloat instead of per-crate bloat
  • bloat_args - Custom arguments to pass to cargo bloat
  • tree_args - Custom arguments to pass to cargo tree
  • exclude_packages - packages to exclude from running cargo bloat on (useful for projects unsupported by cargo bloat such as static libraries).

Screenshots

Total size change

Size difference per crate

Changes in your dependency tree (cargo tree)

Why?

I think it's important to track the size of your dependencies. It's not the most important thing, but I think these metrics belong in a pull request that modifies dependencies in order to have a full picture of the impact the change makes and to make an informed decision before merging.

Contribute

All contributions are welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.