• trem@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    3
    ·
    3 hours ago

    5 minutes sounds like way too much, unless you mean a fresh compile. But then you shouldn’t need to wait that long between changes, since incremental compilation should kick in then.

    And like sure you can break shit up into crates to speed up compilation, but to do that you already have to have a design you’re happy with and that’s stable.

    I mean, if you have your modules structured in a tree structure and with proper visibility, then it isn’t a particularly big leap to put it into a separate crate. You just move the files, maybe fix some visibility modifiers still, and then a bit of boilerplate to add it to the workspace.

    It’s only really when you’re publishing to crates.io, that you don’t particularly want to keep changing the names/scopes of the crates, as they’ll stick around on there for the foreseeable future.

      • Dessalines@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        19 minutes ago

        5m seems about right. Lemmy’s from scratch builds are ~3.5m on a fast machine, and we have ~60k lines of code, and are using some with large libraries with lots of features enabled.

        But you really should only ever have to do a from scratch build either at the beginning, or when you deploy. When developing, your IDE should only ever really run check or clippy, which should take seconds at most.

        • ☆ Yσɠƚԋσʂ ☆@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          12 minutes ago

          I should really revisit this. I know I looked at it again. The compiling crops up I you actually want to run the app and test drive the changes live.