The Gram Code Editor - 2026-10-05


  1. ashleytg

    i like Rust for the tooling :3

  2. ashleytg

    Zig is also nice

  3. nicoco

    the "copy permalink" context menu for pointing to codeberg is sooooooooooo sweet! ♥

  4. 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 ✎ ↺

  5. 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 ✏ ↺

  6. 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..

  7. mort

    Those numbers are from an M1 Pro. 20 minutes for a build is ... quite a while :p

  8. 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

  9. ashleytg

    i love reading the development stuff here :>

  10. 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

  11. 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

  12. krig

    ah interesting, I did the same here just now

  13. 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

  14. mort

    Oh, interesting

  15. 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

  16. krig

    everything dependency related gets so complex with this number of dependencies, haha

  17. krig

    pushed my changes now, including the aws-lc-rs removal

  18. 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

  19. mort

    Didn't consider trying to just change it in the top-level Cargo.toml and seeing what happens haha

  20. krig

    haha yolo mode over here

  21. mort

    But I can confirm that it seems to work here too

  22. krig

    nice!

  23. ashleytg

    the compile time might be able to be shorter if the libraries are made my Gram! :3

  24. ashleytg

    instead of out sourcing themn

  25. ashleytg

    !*

  26. ashleytg

    it would take a long time, but it would create the exclusion of unused features!

  27. krig

    oh yeah that would be a massive project.. maybe easier to start from scratch then :D

  28. 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 😅

  29. krig

    haha gah

  30. krig

    wonder what happens if I try to use different versions on different platforms… gah

  31. 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

  32. mort

    Ah no, that project doesn't seem too active: https://github.com/dignifiedquire/async-tar/issues/68 has been open since may

  33. 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..

  34. 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)

  35. 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

  36. mort

    Why is async wanted here anyway, wouldn't it be just as ok to spawn a thread which uses normal sync IO?

  37. mort

    Oh but async_tar is used in all kinds of places, all of which are kinda built around async and not threading

  38. 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

  39. ashleytg

    also have multiple different Linux OSes

  40. ashleytg

    and BSDOSes

  41. ashleytg

    uh

  42. ashleytg

    only thing i'm missing, is MacOS 😭

  43. 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!

  44. ashleytg

    possibly start with small replacements

  45. ashleytg

    then slowly, move to larger libraries!

  46. ashleytg

    we could also make it separate Gram projects!

  47. ashleytg

    instead of including the libraries in um

  48. ashleytg

    the actual Gram src code, separate repos, then that code goes to the actual Rust library stuff!

  49. 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

  50. krig

    at least some dependencies are fully slop now so replacing those would be fantastic…