Skip to content

Linux Roadmap #7015

Description

@mikayla-maki

This is Zed's official roadmap and progress tracker for porting Zed to Linux.

Contributor Guide

There's a lot of surface area to cover and we would love contributions for anything from fixing a small todo(linux), to adding a large feature. That said, it'd probably be good to check in with us or our community in the #linux-port channel of our official Discord. Once you have a project underway, please open a draft PR with a description and small checklist of what you expect should be done, like so, so we can follow along, make suggestions, etc. If you have code that is stubbed out or out of scope, please mark it with a comment containing todo(linux), so we can search for it later.

To setup your machine to build and run Zed, run or reference the script in script/linux.

TODO

  • Implement a UI renderer
  • Implement a text system
  • Implement a Wayland and X11 client
  • Add inotify based file watching
  • Add in-app menus and prompts
  • Add support for the primary selection buffer
  • Integrate with local settings
  • Add support for File drag and drop
  • Implement the CLI
  • Implement IME
  • Hook up crash reporting, telemetry, etc.
  • Release Zed

Activity

  1. added
    trackingDEPRECATED label: use issue type 'Tracking' instead
    on Jan 29, 2024
  2. pinned this issue on Jan 29, 2024
  3. jgcodes2020 commented on Jan 29, 2024

    @jgcodes2020

    Priority is to make a 'native feeling' window, if we can do that with X11 and Wayland directly, like winit does, then we should do that.

    Window decorations on Linux are a mess.

    1. All X11 window managers will provide decorations for you.
    2. Some Wayland environments can provide decorations for you via xdg-decoration. This includes KDE, plus Sway and other wlroots-based compositors.
    3. Other Wayland environments (read: GNOME) want you to draw your own decorations. GNOME developers are adamantly against server-side decoration. I can't tell if Zed currently uses client-side decoration, but if not, that is a high priority. See this GNOME blog post for their guidelines.

    EDIT: Just read the task list again. GTK 4 will not let you create a simple window with a fullscreen Vulkan context as you might want.

  4. JamesMowery commented on Jan 29, 2024

    @JamesMowery

    +1 to please officially support both Flatpak and AppImage formats.

  5. julianbraha commented on Jan 29, 2024

    @julianbraha
    Contributor

    Rust SDK is cross platform, but it uses tokio, which we don't want to use.

    @mikayla-maki could you expand on this? I've had a good experience with tokio and am unaware of the downsides.

  6. changed the title [-]The road to Linux[/-] [+]The Road to Linux[/+] on Jan 29, 2024
  7. ringods commented on Jan 29, 2024

    @ringods
    Contributor

    You might want to look at the reasoning of @mitchellh for not providing Linux binary builds, but working with package maintainers:

    https://x.com/mitchellh/status/1750942357510627605?s=20

  8. mikayla-maki commented on Jan 29, 2024

    @mikayla-maki
    MemberAuthor

    @julianbraha we provide our own executor that integrates with the macOS runtime and would prefer to not be running multiple independent executors if we can help it.

    Tokio is awesome and I love the project, it’s just not in our particular niche :)

  9. julianbraha commented on Jan 29, 2024

    @julianbraha
    Contributor

    we provide our own executor that integrates with the macOS runtime and would prefer to not be running multiple independent executors if we can help it.

    I see, so it would be easier to port this executor to other platforms, than to replace Zed's executor with Tokio?

  10. mikayla-maki commented on Jan 29, 2024

    @mikayla-maki
    MemberAuthor

    Exactly!

  11. Akselmo commented on Jan 29, 2024

    @Akselmo

    Flatpak is good for something you want on multiple linux distros with least amount of effort. However remember that flatpak has some security systems in place, so for example reading header files from /usr/... can be difficult for language-server processes that are launched within the flatpak. (This may be changed over time, dunno)

    Having a tarball that distro packages can just make installable (or people can just drop it in ~/.local/bin/ is probably the best at first.

    Look and feel wise, i hope you go for a solution that works on most platforms: KDE Plasma uses QT, GNOME uses GTK and so on. GTK is likely the most flexible across multiple desktop environments (or bare WM's), because Plasma can "modify" GTK themes to fit in (albeit it's never really perfect fit).

    Decorations, and well everything-else wise: Just use xdg portals. They're the bread and butter of modern linux desktop. :)

    Edit: To add, avoid targeting X11. It is on it's way out of many desktop environments. Wayland is the preferred target.

  12. aminya commented on Jan 30, 2024

    @aminya
    Contributor

    I made three pull requests to get the ball rolling.

    #6854
    #6855
    #6859

    The next step is to implement a Wgpu or Vulkano backend.
    I started the work here, however, Gpui assumes an interface that is hard to implement for things other than MacOS Metal, and it takes quite a lot of time and expertise in GPU to do that. So it needs to be teamwork.

    I have seen the Windows implementation here, but not sure if it is sustainable to duplicate the work for each operating system instead of using a cross-platform abstraction.
    https://github.com/PianoPrinter/gpui_win

    Originally posted by @aminya in https://github.com/zed-industries/zed/issues/6868#issuecomment-1913485159

  13. 63 remaining items

  14. ckissane commented on Feb 16, 2024

    @ckissane

    Is there any reason most of the discussion seems to be about using gtk as a toolkit instead of QT?

    Additionally, I don't think it makes sense to do client-side decorations just because one DE (gnome), says they like them. For most other DEs, like KDE Plasma and xfce, this is not the norm.

    At the very least If one does add support for some sort of fancy client side decorations, It should be an option in my opinion.

  15. MrHaroldA commented on Feb 16, 2024

    @MrHaroldA

    Additionally, I don't think it makes sense to do client-side decorations just because one DE (gnome), says they like them. For most other DEs, like KDE Plasma and xfce, this is not the norm.

    I thought Xfce switched to CSD as well? https://www.omgubuntu.co.uk/2020/01/xfce-4-16-client-side-decoration

  16. Jak2k commented on Feb 16, 2024

    @Jak2k

    Additionally, I don't think it makes sense to do client-side decorations just because one DE (gnome), says they like them.

    But what, when that one DE is used by most distros?

  17. phisch commented on Feb 16, 2024

    @phisch
    Contributor

    This discussion seems a bit pointless, considering you have to implement client side decorations for gnome anyway. You can then make this configurable, for example how vscode gives you the option between native, and custom decorations, where native means the compositor draws their own decorations, and custom means vscode draws client side decorations.

  18. Titaniumtown commented on Feb 18, 2024

    @Titaniumtown

    Wayland fractional scaling: #7961
    Wayland improved keyboard handling: #7970

  19. jansol commented on Feb 18, 2024

    @jansol
    Collaborator

    This discussion seems a bit pointless, considering you have to implement client side decorations for gnome anyway.

    Not to mention that Zed already chooses to unconditionally do CSD on macOS, as a style choice. For GPUI in general it's a more open-ended question, but I think that warrants opening a separate issue just for sorting that part out.

  20. KGrewal1 commented on Feb 18, 2024

    @KGrewal1
    Contributor

    Regarding fsevents becoming cross platform, for linux there are inotify bindings for rust (https://docs.rs/inotify/latest/inotify/), however there seems to be a bit of wrangling needed to get this to work with the current framework eg the file flags coming directly from ffi: is this something that you'd prefer to have done in-house at zed due to how opinionated this may be?

  21. Fullbrik commented on Feb 18, 2024

    @Fullbrik
  22. locked as off topic and limited conversation to collaborators on Feb 18, 2024
  23. SomeoneToIgnore commented on Feb 18, 2024

    @SomeoneToIgnore
    Contributor

    I think we've got enough off-topic comments at this point, locking the entire conversation to avoid spamming peoples' emails.
    @\mikayla-maki or anybody else relevant to the actual development process are welcome to undo this, or (as I would prefer but not insisting) post development updates here themselves.

    Consider opening a PR with related changes or using Zed Discord as a platform for discussions.

  24. changed the title [-]The Road to Linux[/-] [+]Linux Roadmap[/+] on Apr 11, 2024
  25. SomeoneToIgnore commented on Apr 22, 2024

    @SomeoneToIgnore
    Contributor

    Small update: the web site is being transitioned gradually towards multiple platforms: https://zed.dev/download

    image

    and seems that Linux build is quite usable at this point, so we hope to have "alpha" Linux builds will soon be published regularly.

  26. unpinned this issue on Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:gpuiGPUI rendering framework supportignore top-ranking issuesthe script which generates Top-Ranking Issues lists (by upvotes) will ignore thisplatform:generalAn umbrella label for general platform supportplatform:linuxhappens only on linux, not other OStrackingDEPRECATED label: use issue type 'Tracking' instead

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions