microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.74k stars 29.46k forks source link

Add terminal to vscode.dev #135565

Closed ghost closed 1 year ago

ghost commented 3 years ago

Similar to Replit, I would like to ask to add some sort of terminal to the online version of vscode. This could help people on limited devices download external packages, run their program, and more. Replit has a full shell and terminal built into each project, and it allows for full functionality of a typical shell. This would be extremely beneficial to people using languages such as Go, Python, etc. along with others using c/c++ that would like to download libraries like curlpp.

Tyriar commented 3 years ago

I've been thinking about how to do this for a while, we might come up with a solution eventually 🙂

Note that vscode.dev doesn't have a backing server like replit, replit is closer to Codespaces which is backed by a dev container.

gjsjohnmurray commented 3 years ago

https://github.com/microsoft/vscode/issues/135207#issuecomment-944956647

@Tyriar I'll be interested to see if the team comes up with a solution someday.

yume-chan commented 3 years ago

StackBlitz previously announced WebContainer which supports running Node.js and npm (including http server) all in browsers. Maybe vscode.dev can adopt that after their GA or build a similar thing itself.

But ultimately, I don't expect it to support every program unless using a virtual machine. Because we only need the terminal it may not be completely impossible.

Tyriar commented 3 years ago

@yume-chan if web container is open sourced and has a license we can use we could leverage their work, otherwise we'd need to build our own similar thing.

egeucak commented 3 years ago

what about being able to use a terminal over an ssh connection? would it be possible to do something like cloud shell from GCP?

Tyriar commented 3 years ago

@egeucak that would be possible, but that's a different thing and essentially what Codespaces is.

abflow commented 2 years ago

"if web container is open sourced and has a license we can use we could leverage their work, otherwise we'd need to build our own similar thing."

Or perhaps, Microsoft could buy StackBlitz in order to make the process quicker...

"StackBlitz is the first online IDE whose compute model makes sense to me."

TOM PRESTON-WERNER, founder of GitHub & investor in StackBlitz - Introducing WebContainers

abflow commented 2 years ago

What about wasi-fs-access ?

This is a demo shell powered by WebAssembly, WASI, Asyncify and File System Access API. https://github.com/GoogleChromeLabs/wasi-fs-access

Tyriar commented 2 years ago

Yep that would be one approach

agowa commented 2 years ago

How about adding a shell for CPython only for now? The main branch of CPython now compiles to web assembly. So it should/could be feasible to integrate it so that it can access the same data as within vscode.dev.

Example: https://repl.ethanhs.me/ Build scripts: https://github.com/ethanhs/python-wasm

Tyriar commented 2 years ago

@agowa338 even just that is easier said than done, also we don't include Python smarts out of the box so it would need to come in via an extension anyway. I think an extension could implements that via the Pseudoterminal extension API, my main worry there would be in pushing something out that might end up getting ripped out, angering users later.

Tyriar commented 1 year ago

Not planning on pursuing this anytime soon

vscodenpa commented 1 year ago

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!