• by moi2388 on 1/15/2025, 4:24:58 PM

    “ With a team of three experienced developers, we have implemented ScopeDB from scratch”

    “ with 100 direct dependencies and 647 dependencies in total”

    Next up: watch me build numpy from scratch with only 150 dependencies, one of which numpy.

  • by stuhood on 1/15/2025, 8:45:33 PM

    When it comes to understanding the risks involved with having this many dependencies, one thing that folks might not understand is that Rust's support for dependency resolution and lock files is fantastic.

    Tools like `cargo audit` can tell you statically based on the lockfile which dependencies have security vulnerabilities reported against them (but you have to run it!). And Github's https://github.com/dependabot/ will do that same thing automatically, just based on the existence of the lockfile in your repo (and will also open PRs to bump deps for you).

    And as mentioned elsewhere: Cargo's dependency resolver supports providing multiple versions of a dep in different dependency subgraphs, which all but eliminates the "dependency hell" that folks expect from ecosystems like Python or the JVM. Two copies of a dep at different versions? Totally fine.

  • by binaryturtle on 1/15/2025, 4:15:00 PM

    Isn't that something that should be posted April 1? I'm really not sure if the author is proud about the fact that his project has so many dependencies. Is that something modern coders aim for these days? I usually try to achieve the exact opposite in my projects.

  • by thadt on 1/15/2025, 5:43:30 PM

    "An absolutely outrageous number of dependencies! What a bunch of wankers."

    I comment, in a Chromium[1] tab, running on my Ubuntu[2] box.

    [1] https://github.com/chromium/chromium/blob/main/.gitmodules

    [2] https://releases.ubuntu.com/24.04/ubuntu-24.04.1-desktop-amd...

  • by mlok on 1/19/2025, 4:49:52 PM

    Related : "Build a Database in 3000 Lines with 0 Dependencies" https://news.ycombinator.com/item?id=42725163

  • by ergonaught on 1/15/2025, 4:16:06 PM

    While acknowledging one does not "have to" have so many dependencies, the prevalence of this npm-esque type of practice is one of the two things that destroyed all of my interest in Rust.

  • by Deukhoofd on 1/15/2025, 4:14:07 PM

    I really chuckled about how the blog post opens with how great Rusts open-source ecosystem is, and ends with an "anyway, we made our software private and proprietary"

  • by dabinat on 1/15/2025, 7:04:48 PM

    I was hoping this would be a discussion of Rust build times and how they optimized them with that number of dependencies.

    But I think it’s easy for people to criticize dependencies from afar without understanding what they’re used for. I’m sure the dependencies in my projects would look strange to others - for example, I use three HTTP libraries: one for 95% of cases and the others for very specific use-cases where I need control at a low level. But without that context it might seem excessive.

  • by flufluflufluffy on 1/15/2025, 5:01:40 PM

    I read the title thinking it was a joke, and after reading the article, I still can’t tell if it is or not.

  • by etaioinshrdlu on 1/15/2025, 4:14:32 PM

    My main question is why observability data needs (or benefits from) a tailor-made database instead of a general purpose one. In 2025, anyone working on observability who told me they have to build their own database, I would be very suspicious!

  • by EVa5I7bHFq9mnYK on 1/15/2025, 4:44:56 PM

    57 of which written by DPRK Koding Forces, waiting for the right moment to push a glorious update, striking at the heart of The Biggest Enemy.

  • by robertclaus on 1/15/2025, 7:57:35 PM

    I'm having a real crisis trying to decide whether this system should be called a database or not. It's a system for managing data, so obviously it is.. but by that loose interpretation any CRUD webserver would count too.

  • by estebank on 1/15/2025, 4:22:49 PM

    Yet another thread where people go "Dependency number too big! Rust bad!" with the level of nuance of my dogs discussing dinner.

    The full list is linked in the article https://gist.github.com/tisonkun/06550d2dcd9cf6551887ee6305e...

    There isn't a single thing there that seems iffy to me. Rust projects split themselves into as small of a crate as possible to 1) ease their own development, 2) improve compile times to make their compilation trivially parallelizable, and 3) allow for reuse. Because of this, you can easily end up with a dozen crates all written by the same group of people, meant to be used together. If a project is a single big crate, or a dozen small crates, you're on the exact same situation. If you wouldn't audit the small crates because they are a lot, you wouldn't audit the big crate thoroughly either.

    But what about transitive dependencies? Similar thing: if you have a crate to check for the terminal width, I prefer to take the existing small crate than copy paste its code. I can do the latter, but then you end up with effectively a vendored library in your code that no tool can know about to warn you when a security vulnerability has happened.

  • by carlos-menezes on 1/15/2025, 5:00:48 PM

    100 direct dependencies is insane.

  • by kpcyrd on 1/15/2025, 6:11:05 PM

    The title of the submission is somewhat bait, unfortunately the Cargo.lock doesn't seem to be public. Since my current Rust side-project also has some kind of database (along with, well, a p2p system) and also totals 454 dependencies, I've decided to do a breakdown of my dependency graph (also because I was curious myself):

      - 85 are related to gix (a Rust reimplementation of git, 53 of those are gix itself, that project is unfortunately infamous for splitting things into crates that probably should've been modules)
      - 91 are related to pgp and all the complexity it involves (aes with various cipher modes, des, dsa, ecdsa, ed25519, p256, p384, p521, rsa, sha3, sha2, sha1, md5, blowfish, camellia, cast5, ripemd, pkcs8, pkcs1, pem, sec1, ...)
      - 71 are related to http/irc/tokio (this includes a memory-safe tls implementation, an http stack like percent-encoding, mime, chunked encoding, ...)
      - 26 are related to the winapi (which I don't use myself, but are still part of the resolved dependency graph)
      - 8 are related to web assembly (unused when compiling for Linux)
      - 2 are relatd to android (also unused when compiling for Linux)
    
    In some ways this is a reminder of how much complexity we're building on top of for the sake of compatibility.

    Also keep in mind "reviewing 100 lines of code in 1 library" and "reviewing 100 lines of code split into 2 libraries" is still pretty much the same amount of code (if any of us actually reviewed all their dependencies). You might even have a better time reviewing the sha2 crate vs the entirety of libcrypto.so, if that's all you needed.

    My project has been around for (almost) two years, I scanned every commit for vulnerable dependencies using this command:

        for commit in $(git log --all --pretty='%H'); do git show "$commit":Cargo.lock > Cargo.lock && cargo audit -n --json | jq -r '.vulnerabilities.list[] | (.advisory.id + " - " + .package.name)'; done | sort | uniq
    
    I got a total of 25 advisories (basically what you would be exposed to if you ran all binaries from every single commit simultaneously today). Here's the list:

        RUSTSEC-2020-0071 - time
        RUSTSEC-2023-0018 - remove_dir_all
        RUSTSEC-2023-0034 - h2
        RUSTSEC-2023-0038 - sequoia-openpgp
        RUSTSEC-2023-0039 - buffered-reader
        RUSTSEC-2023-0052 - webpki
        RUSTSEC-2023-0053 - rustls-webpki
        RUSTSEC-2023-0071 - rsa
        RUSTSEC-2024-0003 - h2
        RUSTSEC-2024-0006 - shlex
        RUSTSEC-2024-0019 - mio
        RUSTSEC-2024-0332 - h2
        RUSTSEC-2024-0336 - rustls
        RUSTSEC-2024-0345 - sequoia-openpgp
        RUSTSEC-2024-0348 - gix-index
        RUSTSEC-2024-0349 - gix-worktree
        RUSTSEC-2024-0350 - gix-fs
        RUSTSEC-2024-0351 - gix-ref
        RUSTSEC-2024-0352 - gix-index
        RUSTSEC-2024-0353 - gix-worktree
        RUSTSEC-2024-0355 - gix-path
        RUSTSEC-2024-0367 - gix-path
        RUSTSEC-2024-0371 - gix-path
        RUSTSEC-2024-0373 - quinn-proto
        RUSTSEC-2024-0421 - idna
    
    I guess I'm doing fine. Keep in mind, the binary is fully self-contained, there is no "look, my program has zero dependencies, but I need to ship an entire implementation of the gnu operating system along with it".

  • by 1vuio0pswjnm7 on 1/15/2025, 8:28:36 PM

    At first I thought this was sarcasm.

    647 points of failure.

  • by synergy20 on 1/15/2025, 5:43:39 PM

    so,npm hell,or pip hell again?

    to be fair, python pkg dependency are fine to me,there might be a lot of pip pkgs still,but not a few hundreds like npm and cargo normally pulls in.

    golang also has a reasonable amount of dependencies. npm and cargo dependencies are just scary due to the huge number.

  • by dboreham on 1/15/2025, 4:02:31 PM

    Poster boy for all that's wrong with modern software modularity.

  • by henning on 1/15/2025, 3:58:31 PM

    I automatically don't want to use this database because the number of third party dependencies are an unfixable, never-ending source of security vulnerabilities.

  • by eknkc on 1/15/2025, 4:15:17 PM

    Is the dependency count supposed to be impressive?