Maybe compared to electron, but binary size is an issue with any nontrivial rust application. Due to how cargo works, it compiles and bundles in every dependency in world.
400MB is unnecessarily large though.
This needs to be justified asap to help people understand and reconsider installing it.
897MB! But it appears to have installed itself twice for some reason. Maybe one is an 'update' which it didn't clean up...? I'm not sure.
Edit: I just opened it and it cleaned itself up. 408MB now. I guess it was in the process of upgrading.
Honestly I'd be all for this if the OS had a good autoupdate mechanism for 3rd party applications. But that's not the world we live in. Certainly not on windows - which is too busy adding antivax conspiracy articles to the start menu.
And with Chromium this directly leads to crashes - when you update the browser as its open, the new tabs will open with the new version of the binary, with the old ones still using the old binary - which usually leads to crash.
I prefer 'you cannot do X' instead of 'we allow you to do it, but it might misbehave in unpredictable ways'.
The world moved into dynamic linking in the 1980's for a reason.
It is cool to advocate for a return to static linking when it is basic CLI tools.
Reasons that no longer exist. Storage is cheap, update distribution is free, time spent debugging various shared lib versions across OSes is expensive.
My /usr is 15G already, and /var/lib/docker isn't that far off despite people's obsession with alpine images. If more people would dismiss storage as cheap it'll quickly become expensive, just not per GiB.
> update distribution is free
I wouldn't be surprised if at one point Github would start restricting asset downloads for very popular projects simply because of how much traffic they'd generate.
Also, there's still plenty of places on the planet with relatively slow internet connectivity.
They should shut up and just buy bigger drives. Ah, they can't on their laptops, bummer.
Also try to develop mobile apps with that mentality,
https://www.abbacustechnologies.com/why-your-app-keeps-getti...
I don't check the installation size of applications anymore.
This feels especially relevant since we're discussing Zed here, the Mac-focused developer tool, and developers working on Mac are the exact people who pay $600/TB.
You could say "just don't buy Apple products". And sure, that might be a solution for some. But the question of what laptop to buy is an extremely complicated one, where storage pricing is just one of many, many, many different factors. I personally have landed on Apple laptops, for a whole host of reasons which have nothing to do with storage. That means that if I have to bump my storage from 1TB to 2TB, it directly costs me $600.
Embrace your wallet will be owned by Apple. Then you can continue.
Sorry, but people buying Apple products are different bread :D
I'll be very grateful if you stopped using all my RAM for two buttons and a scrollbar thank you.
> At this time, we prioritize performance and out-of-the-box functionality over minimal binary size. As is, this issue isn't very actionable, but if you have concrete optimization ideas that don't compromise these priorities, we'd be happy to consider them in a new issue.
For people who are serious about their text editors, 400m is a small price to pay for something that works for you.
Half of Electron namely Node.js. As majority of lsp are .js based. Also extensions are WASM. Also VS Code keeps extensions in separate config directory, while Zed in main directory.
400 mb for new project in this amazing bestest compiled language ever made is ridiculous.
And that's still comparing apples to oranges, because git is compiled with full optimizations. Running `cargo build --release` produces a 462KB binary.
Even if I'm comparing to my system's git installation, that's still 3.9MB, and that's with all the debug info stripped.
Yes rust (like C++) tends to produce larger binaries than C, but lets be real here: The reason Zed has a bloated binary is the ~2000 rust packages that comprise it.
Hundreds of those MBs are from tree-sitter grammars, which are JavaScript compiled to C.
For what it's worth, the zed executable on Linux weighs 3.2 MB.
EDIT: Sorry, the nix store is too good at hiding things from me. It's actually around 337 MB plus webrtc-sys.
$ pwd
/tmp/zed/target/release
$ ls -lh ./zed
-rwx------ 2 john john 1.4G Aug 28 17:10 zed
--- $ dut zed/ | sort -h
598M 0B | | /- webrtc-sys-0a11149cbc74bc90
598M 0B | | | /- out
598M 0B | | |- webrtc-sys-090125d01b76a5e8
635M 160M | | /- s-hal7osjfce-1h7vhjb-4bdtrsk93m145adnqs17i9dxe
635M 160M | | |- project-06kh4lhaqfutk
641M 161M | | /- project-1ulvakop54j8y
641M 161M | | | /- s-hal5rdrth3-0j8nxqq-d0wsc7qnin39797z4e8ibhj4w
1.1G 1.1G | | /- zed-ed67419e7a858570
1.1G 1.1G | |- zed
1.3G 1.3G | /- zed-64b9faeefdf3b7df
1.3G 1.3G |- zed
1.4G 0B |- build
2.2G 0B | |- build
7.9G 1.4G /- deps
9.4G 0B |- release
14G 2.9G | |- incremental
19G 4.2G | /- deps
33G 0B /- debug
42G 0B /- target
42G 0B zed
Summary: $ du -h ./target/debug/deps/
20G ./target/debug/deps/
$ du -h ./target/release/deps/
8.0G ./target/release/deps/
$ du -h ./target/debug/zed
1.2G ./target/debug/zed
$ du -h ./target/release/zed
1.4G ./target/release/zed
This is on a whole new level of bloat; both with regarding to dependencies AND the resulting executable file. ls -lh /nix/store/63rdpgbzn7f1smh7688crcrpfsh833bb-zed-editor-0.199.10/bin/zeditor
-r-xr-xr-x. 2 root root 3.2M Jan 1 1970 /nix/store/63rdpgbzn7f1smh7688crcrpfsh833bb-zed-editor-0.199.10/bin/zeditor
EDIT: Ah, it was too good to be true :(
ls -lh /nix/store/52smrb1z8r4n71zx50xagkcdrhlga4y5-zed-editor-0.207.4/libexec/.zed-editor-wrapped
-r-xr-xr-x. 2 root root 337M Jan 1 1970 /nix/store/52smrb1z8r4n71zx50xagkcdrhlga4y5-zed-editor-0.207.4/libexec/.zed-editor-wrappedExtra weight also comes from webrtc, which nixpkgs dynamically links. So yeah, it's quite a large binary indeed.
$ strip --strip-all ./target/release/zed
$ du -h ./target/release/zed
261M ./target/release/zed
$ strip --strip-all ./target/debug/zed
$ du -h ./target/debug/zed
482M ./target/debug/zed
Correct. It is still embarrassing, in my opinion.To make matters worse, it takes several minutes for Zed's window to appear on a cold start, whereas VSCode launches almost instantly.
[1] I am trying to measure it as we speak but it is taking quite a long time.
That one is interesting. It's much quicker for me, even cold starts are below 1s, and subsequent startups are basically instant.
I wonder why though.
[1] I have not measured subsequent launches of VSCode though, but Zed is relatively pretty quick after the initial launch.
Unless by "compiled in", some in-lining of the C code into Rust codebase is meant.
[1] https://github.com/emacs-tree-sitter/tree-sitter-langs/relea...
Maybe something like this to figure out what directories to delete:
# With dut
find . -type f -name Cargo.toml -printf '%h\n' | sort -u | xargs -r -d '\n' -I{} dut -s {} | sort -h
# With du
find . -type f -name Cargo.toml -printf '%h\n' | sort -u | xargs -r du -sh | sort -h
I found "websocat" and "ripgrep". Thankfully I got rid of everything else. ripgrep $ cargo clean
Removed 3411 files, 1020.2MiB total
websocat $ cargo clean
Removed 1726 files, 820.7MiB total
That said, ripgrep itself is only 5.0M.Or the fact that there is incremental compilation artifacts...
And of course the amount of dependencies. A single project might depend on hundreds of crates (quite common), each compiled separately with its own build artifacts. sighs.
I'm not sure what gave you that impression. I'd say Rust is pretty well known for fat binaries
RAM:
213 MB Zed
41 MB ST
Storage:
406 MB Zed
52 MB ST
Startup time:
Zed is slower than ST (but only by a few milliseconds).
Also when you reopen ST it will remember how you've resized the window from last time whereas Zed won't.
Haha wait what? Are you confusing Zed (the text editor) with something else? Surely it doesn't ship with video conferencing???
I disagree Zed is an IDE, it is quite far from InteliJ, Borland/Embarcadero, VS, XCode, Eclipse, Netbeans...
If it is about adding enough plugins until it eventually becomes one, then any programmer's editor is an IDE.
Try to use Zed to debug Go code.
Zed is the new emacs?
In Zed, you need to write a full blown plugin, and can change only what the Zed authors exposed through their plugin API.
For me, as long as it's better than alternatives it's good enough. Especially if it's not running JS.
Also after install, the install directory takes up 400MB+. Even VSCode only takes up around 380MB. I believe it when they say it's not an Electron app, but I do wonder what's being packed in there. I was always under the impresion that Rust apps are pretty lightweight, but that install size is nearing Java levels of binary/dependency bloat.