top | item 47002991

(no title)

ZeroCool2u | 17 days ago

An interesting side effect of moving to wgpu is that in theory with some additional work, this could allow you to run Zed in a web browser similarly to how some folks run VSCode as a remote interface to the backend running on a server.

discuss

order

nu11ptr|17 days ago

From the PR, it sounds like the switch to WGPU is only for linux. The team was reluctant to do the same for macOS/Windows since they felt their native renderer on those platforms was better and less memory intensive.

swiftcoder|17 days ago

> they felt their native renderer on those platforms was better and less memory intensive

This definitely would be worth some profiling. I don't think it's a given that their custom stacks are going to beat wgpu in a meaningful way.

ZeroCool2u|17 days ago

Yes, but they can add a flag to switch renderers on startup like they had for blade.

rafaelmn|17 days ago

Rendering in the browser has nothing to do with being able to do remote editing like you can in VSCode - you would just be able to edit files accessible to the browser.

Just like you can hook up local VS code native up to a random server via SSH, browser rendering is just a convenience for client distribution.

You would need a full client/server editor architecture that VS code has.

nindalf|17 days ago

Quoting maddythewisp from that PR:

> There is significant work beyond the renderer that would need to happen to run Zed in a browser - notably background tasks and filesystem/input APIs would need web/wasm-compatible implementations.

arghwhat|17 days ago

Well, not really. It means you have a renderer that is closer to being portable to web, not an editor that will run in web "with some additional work". The renderer was already modular before this PR.

usefulcat|17 days ago

If you're talking about remote editing (editing files which reside on a remote server), Zed already supports that?

Octoth0rpe|17 days ago

I believe they're referring to running Zed entirely in a browser. This opens up possibilities like using zed for something like codepen, or embedding it into a git web frontend like gitea. Many projects like this basically embed vscode, a rare benefit of being an electron app which Zed is not.

readitalready|17 days ago

Can this be done on a cheap AWS EC2 instance?

ZeroCool2u|17 days ago

Sure it takes very little hardware power to do this, but Zed isn't actually setup for this yet. This is in theory and after a few more API's are adapted.