Giter VIP home page Giter VIP logo

Comments (3)

RazrFalcon avatar RazrFalcon commented on July 22, 2024 1

Will have to take a look. cargo-bloat shows .text section size as is. No post-processing. Maybe binutils does something else.

from cargo-bloat.

hudson-ayers avatar hudson-ayers commented on July 22, 2024 1

@tnballo I recommend adding a rust-toolchain file and pegging a particular nightly to each of your examples to simplify the process of replicating your results.

If you pass the -A flag to GNU binutiles size, you will see the actual sizes of each section. Without the -A flag, size uses the Berkeley format, in which "text" is actually the sum of the size of all sections which the size utility guesses to be read only data (source: https://sourceware.org/binutils/docs/binutils/size.html)

from cargo-bloat.

tnballo avatar tnballo commented on July 22, 2024

@hudson-ayers - thanks for both suggestions!

I've update the writeup to use a rust-toolchain.toml. AFAIK it supports components but not cargo sub-commands, so I've noted use of cargo-size version 0.3.4 and cargo-bloat version 0.11.0 explicitly (latest availible).

Pegged to nightly-2021-12-04, I still see a slight discrepancy:

cargo bloat cargo size
min_size_no_std 13.9KB 14.2KB
min_size_std 16.4KB 16.8KB

from cargo-bloat.

Related Issues (20)

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.