• MonkderVierte@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        8 hours ago

        Not cargo per se, but even the tutorial for a cli-tool is like “setup clap, which has 20 dependencies and a kitchen sink”. The whole (cargo-centric) ecosystem is much like Node, with the same problems.

        And also, cargo.toml has inconsistencies and double-standards.

        • BB_C@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          5 hours ago

          Not cargo per se, but even the tutorial for a cli-tool is like “setup clap, which has 20 dependencies and a kitchen sink”. The whole (cargo-centric) ecosystem is much like Node, with the same problems.

          cargo new with-clap
          cd with-clap
          cargo add clap --no-default-features
          
          % cargo tree
          with-clap v0.1.0 (/tmp/with-clap)
          └── clap v4.6.0
              └── clap_builder v4.6.0
                  ├── anstyle v1.0.14
                  └── clap_lex v1.1.0
          

          And also, cargo.toml has inconsistencies and double-standards.

          Can you expand on that?

    • TehPers@beehaw.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 day ago

      You can run rustc directly! You just need to pass about 30 different parameters to it as well as a list of all the dependencies you use and…

      Look, it works for small projects.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        13 hours ago

        The only reason to do this is if you’re directly integrated Rust into an existing build system (e.g. Bazel). It’s not going to help with this problem at all.

        • TehPers@beehaw.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          13 hours ago

          No, it wont. I wasn’t suggesting someone should use rustc directly. You’re already using Rust, so using cargo isn’t adding to the supply chain.

          That being said, there was one time I needed to use rustc directly. We had an assignment that needed to be compilable from a single source file. I couldn’t bundle a Cargo.toml, so I gave a build script that used rustc directly.

        • TehPers@beehaw.org
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 day ago

          I don’t see why not. Cargo is fundamentally just a fancy wrapper around rustc, anyway. Sure, it’s a really fancy wrapper that does a lot of stuff but it’s entirely possible to just call rustc yourself.