you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 7 months ago (11 children)

Soo, how do i build Rust packages without Cargo?

  • source
  • hideshow 11 child comments
  • [–] 7 points 7 months ago (4 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 7 months ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 7 months 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.

  • source
  • parent
  • [–] 2 points 7 months ago (4 children)

    Why do you think cargo is a problem?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 7 months ago* (last edited 7 months ago) (3 children)

    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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 7 months ago* (2 children)

    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?

  • source
  • parent
  • hideshow 2 child comments