Stream: compiler development

Topic: Rust dependencies


view this post on Zulip Richard Feldman (Sep 03 2023 at 00:35):

I've been working on a caching-friendly parser, and I recently realized it was using almost none of std and only a couple of dependencies as conveniences. So I tried making it no_std and removing those dependencies, and WOW - instant compile times!

view this post on Zulip Richard Feldman (Sep 03 2023 at 00:36):

I instantly understood why Rik Arends so aggressively minimizes Makepad's dependencies

view this post on Zulip Richard Feldman (Sep 03 2023 at 00:39):

imagine if our only dependency was Inkwell :drooling:

view this post on Zulip Richard Feldman (Sep 03 2023 at 00:41):

(and probably like blake3 and indoc! and one or two others I'm not thinking of)

view this post on Zulip Richard Feldman (Sep 03 2023 at 00:41):

but Inkwell is the only one where I'm like "yeah LOL at the idea of ever dropping that dependency"

view this post on Zulip Richard Feldman (Sep 03 2023 at 00:42):

the editor will always need more too, but not every build needs to include editor stuff

view this post on Zulip Anton (Sep 04 2023 at 08:52):

I instantly understood why Rik Arends so aggressively minimizes Makepad's dependencies

I've also seen him mention that a few times, do you know of a blogpost or video where he explains his process in detail?

view this post on Zulip Folkert de Vries (Sep 04 2023 at 10:01):

I vaguely remember it being discussed in the podcast episode with him

view this post on Zulip Folkert de Vries (Sep 04 2023 at 10:02):

I think the process is pretty simple: just don't add any dependencies

view this post on Zulip Anthony Bullard (Nov 23 2024 at 12:41):

I was coming here to ask this specific question: What is the project's philosophy on dependencies?

For instance, when I go to implement the formatting portion of https://github.com/roc-lang/roc/issues/7214 would we rather me write an implementation of camel->snake_case conversion myself (with tests of course), or use convert_case? I personally am happy to do the former, but I wanted whatever I do be aligned with the rest of the project.

view this post on Zulip Sam Mohr (Nov 23 2024 at 12:51):

The move I'm generally seeing is to eventually bring our dependencies outside of Rust, Zig, and LLVM down to zero if possible. So I'd vote for the homebrew, but it's temporary so it doesn't matter much

view this post on Zulip Richard Feldman (Nov 23 2024 at 13:55):

yeah I'd eventually like all of our compiler crates to be no_std and use no third-party dependencies except:

view this post on Zulip Richard Feldman (Nov 23 2024 at 13:55):

there may be a couple of other exceptions I'm not thinking of, but the point is that the goal is to have a default of doing things ourselves, and then justify a few specific exceptions rather than defaulting to reaching for third-party deps

view this post on Zulip Anthony Bullard (Nov 23 2024 at 14:13):

Sam Mohr said:

So I'd vote for the homebrew, but it's temporary so it doesn't matter much

Can you clarify what you mean here by "it's temporary"? Do you mean the need to convert camelCase to snake_case?

view this post on Zulip Sam Mohr (Nov 23 2024 at 14:20):

Yes, I don't expect we'll maintain camelCase -> snake_case conversion long-term since we'll have finished converting at some point (or gotten enough user code converted to consider it finished).

view this post on Zulip Brendan Hansknecht (Nov 23 2024 at 16:06):

Yeah, we have a ton of dependencies. It would be great to minimize them more.

Also would be great to clean up the build dependency graph... It is spaghetti


Last updated: Jul 06 2025 at 12:14 UTC