• 1 Post
  • 94 Comments
Joined 1 year ago
cake
Cake day: March 12th, 2025

help-circle
  • Rust & cargo do more than just compile. For example, it basically has buit-in ccache.

    It is also easier to split large libraries into multiple crates, though an average project still uses more libraries than an equivalent C project. I wouldn’t be surprised if the “AI” also pulled in more libraries than needed, or has unnecessary library features enabled. I’m pretty sure that a cargo plugin for pruning unused libraries was featured on the rust blog, as a featured third-party plugin for a cargo release.



  • The corners seem a bit rounded & the cat does not fill the box up completely at the sides. Setting margin: 0 could help fill up the box more. I’m not sure where the rounded corners come from, but try border-radius: 0 !important if it’s unintentional.

    Depending on the fit, more padding could be good.

    Have you tried getting your cat involved in politics? I prefer setting left: 100% and right: 0%, but it’s up to you. (Do note that these values are not inherited by children.)




  • The proportions used in the alloy don’t matter. Rust is a build dependency of Chromium, which only makes sense if Chromium itself contains Rust, however little it may be. Thus, whenever an amount of Chromium is added to a substance or application, a small amount of Rust will also be added.

    When Rust is introduced to software, it tends to grow in size and often in proportion too, compared to the rest of the codebase. For example, in the Case of Chromium, the amount varies depending on the age of the Chromium used. In samples of young, and even fairly mature Chromiums, no Rust is present, but resent samples show an ever-increasing amount, though I’m not sure how the Rust was initially introduced to the project.

    Depending on the piece of software in question, it may start completely Rust-free, like Chromium and Linux, or it may be composed of almost pure Rust, like Servo and Redox OS. 100% pure Rust is, as of now, mostly theoretical, though tiny projects requiring manual invocation of rustc have been observed. This is due to the small amount of configuration for a build system, for example, TOML, in the case of Cargo. This allows Rust to be developed easily & ergonomically, even in large amounts. Though recent efforts in Cargo script have sought to alleviate these problems and enable true, pure Rust to develop.

    In short, like life, software naturally evolves into the form of a crab. This process is called carcinisation.














  • The compiler should be able to optimize all of them to the same machine code.

    1. This is already good.
    2. Easily optimized by constant folding.
    3. This one depends on the semantics of signed underflow, so it may not do what you want.
    4. The loop can only exit if x==10, so as long as the nextInt() method doesn’t have side effects, the loop should be eliminated. But, again, language semantics can affect this.

    Edit: Very wrong for 3 & 4, see replies.