-
ashleytg
i like Rust for the tooling :3
-
ashleytg
Zig is also nice
-
nicoco
the "copy permalink" context menu for pointing to codeberg is sooooooooooo sweet! ♥
-
frafav
> Preliminary stats: > * Debug build time: 4m 41s, down from 5m 38s (1 minute saving from 1 dependency!!!) > * Debug binary size: pretty much unchanged, 279M > * Crates built: 1293, down from 1312 > > I'll test out release builds etc tomorrow or something but the code is at https://codeberg.org/GramEditor/gram/pulls/608 if anyone wants to play what are you using to compile? my build time is ~14 minutes (git main right now), plus another ~5 minutes to fetch all the treesitter and all :P. I wonder if gram could take more the lsp configuration like helix. I find it absurd that we have to make a generic boilerplate rust extension that juust launch and external service. in helix it's just a configuration thing✎ ↺ -
frafav
> Preliminary stats: > * Debug build time: 4m 41s, down from 5m 38s (1 minute saving from 1 dependency!!!) > * Debug binary size: pretty much unchanged, 279M > * Crates built: 1293, down from 1312 > > I'll test out release builds etc tomorrow or something but the code is at https://codeberg.org/GramEditor/gram/pulls/608 if anyone wants to play what are you using to compile? my build time is ~14 minutes (git main right now), plus another ~5 minutes to fetch all the treesitter and all :P. I wonder if gram could take more the lsp configuration like helix. I find it absurd that we have to make a generic boilerplate rust extension that just launch an external service. in helix it's just a configuration thing ✏ ↺
-
krig
yeah replacing the extension system and how tree-sitter grammars are compiled and loaded is something I want to work on. Well, I do have tons of attempts to do it but there are a lot of choices to make..
-
mort
Those numbers are from an M1 Pro. 20 minutes for a build is ... quite a while :p
-
krig
I have a M4 mac mini with 48G RAM. If you run Linux, try using wild or mold to link. They should be significantly faster than the default
-
ashleytg
i love reading the development stuff here :>
-
mort
I did some horrible hacks to build gram without aws-lc-sys, using ring as the rustls back-end instead. Saved 10 seconds on a debug build. So not nothing, but also not that massive
-
mort
If Cargo had an easy way to just override the flags of a transient dependency then this would've been trivial, but because it doesn't it gets a bit tricky with having to track down each dependency chain where rustls ends up being used and changing flags. I think zed-reqwest would have to be modified to get it to pass a feature flag to hyper-tls to select whether it should use rustls with ring or with aws-lc-sys
-
krig
ah interesting, I did the same here just now
-
krig
but I didn't need to change anything in zed-reqwest to get it to not use aws-lc-sys.. I think. At least aws-ls-sys dropped from Cargo.lock just by switching in runtimelib and rustls
-
mort
Oh, interesting
-
krig
my guess is zed-reqwest gets it via rustls.. and it's unifying the dependency to use the one with the ring feature flag
-
krig
everything dependency related gets so complex with this number of dependencies, haha
-
krig
pushed my changes now, including the aws-lc-rs removal
-
mort
I tried to dig through what used aws-ls-sys with cargo tree and read out from that what we'd need to change, and concluded that zed-reqwest would end up enabling aws-ls-sys in rustls unconditionally
-
mort
Didn't consider trying to just change it in the top-level Cargo.toml and seeing what happens haha
-
krig
haha yolo mode over here
-
mort
But I can confirm that it seems to work here too
-
krig
nice!
-
ashleytg
the compile time might be able to be shorter if the libraries are made my Gram! :3
-
ashleytg
instead of out sourcing themn
-
ashleytg
!*
-
ashleytg
it would take a long time, but it would create the exclusion of unused features!
-
krig
oh yeah that would be a massive project.. maybe easier to start from scratch then :D
-
mort
@krig I see you just downgraded async-tar from 0.6.1 to 0.5.1 because 0.6.1 breaks the build on Windows... sadly, async-tar 0.5.1 doesn't build on Linux due to depending on ENOATTR which was removed from libc on Linux: https://github.com/rust-lang/libc/issues/1356 😅
-
krig
haha gah
-
krig
wonder what happens if I try to use different versions on different platforms… gah
-
mort
If I had easy access to a windows machine right now I'd try to see what breaks it in 0.6.1, could probably contribute up a fix
-
mort
Ah no, that project doesn't seem too active: https://github.com/dignifiedquire/async-tar/issues/68 has been open since may
-
krig
apparently astral are working on a new project called astral-codec which could be a replacement... but it's very new. There is also the tar crate, maybe it's usable with some async wrapper. Just to get away from the problem entirely..
-
mort
Tar also isn't a very difficult format to implement a parser for, I've written more tar parsers than anyone ought to ever write (two of them being in this repo: https://github.com/mortie/scar)
-
mort
The scary thing about tar is that extracting it, or any other archive format, is full of foot guns; making sure that there's no way to escape the target directory is a tricky problem which smarter people than me have messed up before
-
mort
Why is async wanted here anyway, wouldn't it be just as ok to spawn a thread which uses normal sync IO?
-
mort
Oh but async_tar is used in all kinds of places, all of which are kinda built around async and not threading
-
ashleytg
> If I had easy access to a windows machine right now I'd try to see what breaks it in 0.6.1, could probably contribute up a fix i have access to Windows 10 and a Windows 11 machine
-
ashleytg
also have multiple different Linux OSes
-
ashleytg
and BSDOSes
-
ashleytg
uh
-
ashleytg
only thing i'm missing, is MacOS ðŸ˜
-
ashleytg
Today at 12:36 PM: > oh yeah that would be a massive project.. maybe easier to start from scratch then :D i might try something!
-
ashleytg
possibly start with small replacements
-
ashleytg
then slowly, move to larger libraries!
-
ashleytg
we could also make it separate Gram projects!
-
ashleytg
instead of including the libraries in um
-
ashleytg
the actual Gram src code, separate repos, then that code goes to the actual Rust library stuff!
-
mort
Remember that each library needs to be maintained, it's usually not enough to just write a library once and then you're done with it. So relying on community-maintained libraries where they're actively maintained and of good quality has advantages
-
krig
at least some dependencies are fully slop now so replacing those would be fantastic…