Remix.run Logo
▲ trentor 6 hours ago

...in rust.

▲kvuj 6 hours ago | parent [-]

... with a gorillion dependencies too

https://github.com/openai/mcpfs/blob/main/Cargo.lock

Can anyone familiar explain how can you evaluate which dependencies are safe to use? I remember someone explaining that certain high quality projects were considered trusted enough, but from a quick glance, it seems really hard to check.

For example, the maintainer of endian-type is https://github.com/Lolirofle and has commited very few times this year. The code of the crate is minuscule. Why isn't it in the stdlib?

▲cmrdporcupine 5 hours ago | parent | next [-]

Yep, this is the NPM/Node disease that spread to Rust early in its history and it's really problematic. Very strong impulse to just pull in as many crates as you can to do little bits that should just be stdlib etc. (And additionally is crates.io is a wilderness of unmoderated deps and bottomless dependency trees.)

IMHO this is an anti-pattern that junior engineers fall into. You embrace this style of development because it lets you move fast and borrow others work... until it burns you badly in the ass with licensing, conflicts, security, etc etc and then you're stuck untangling the mess.

I love Rust the language. I do not like Cargo or Crates.io.

For your specific question, you could look at cargo deny (https://github.com/EmbarkStudios/cargo-deny) which lets you set up rules to lint deps. But this is mostly about security and licensing. I'd like something that was more about "reputation" and "cleanliness"

▲kvuj 5 hours ago | parent [-]

Wow that security check seems really useful!

▲cmrdporcupine 5 hours ago | parent [-]

I have CI jobs set up with that for my projects and with everything going on in the last few months it's been a couple advisories a week, just constantly having to upgrade things because of new RUSTSEC etc advisories.

▲Spivak 5 hours ago | parent | prev | next [-]

Look, I get that the dependency explosion is real but this project isn't requiring an unreasonable amount of direct dependencies. It's the massive amount of libs those things depend on where it explodes. The OpenAI devs aren't really the issue here.

▲fcarraldo 5 hours ago | parent [-]

When you choose to take on a dependency, you are also responsible for its transitive dependencies.

▲matja 5 hours ago | parent | prev [-]

> Can anyone familiar explain how can you evaluate which dependencies are safe to use?

Easy - assume none of them are safe, neither now or in the future. Then plan accordingly - Sandbox, principle of least privilege, defense in depth, separation of duties.