在 vscode.dev 中直接运行 Python !纯浏览器环境,无后端

2021-12-05 08:53:24 +08:00
 formulahendry

插件地址: https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner-for-web

GitHub Repo: https://github.com/formulahendry/vscode-code-runner-for-web

欢迎下载试用!

下一步:

10609 次点击
所在节点    分享创造
35 条回复
lopssh
2021-12-05 09:37:17 +08:00
蟹蟹
infun
2021-12-05 10:09:02 +08:00
code runner 支持调试吗?
flyflower
2021-12-05 10:19:50 +08:00
你们都能用 github.dev 吗?我的 github.dev 一直卡在 “Setting up your web editor”😂
cwr31
2021-12-05 11:38:17 +08:00
@flyflower 一样
cwr31
2021-12-05 11:38:56 +08:00
@flyflower 刚试了一下可以了 wc
ptwop
2021-12-05 12:18:20 +08:00
@flyflower #3 我的也是 😂
zmxnv123
2021-12-05 13:01:44 +08:00
想知道原理是什么 js 实现的 python ?
lmqdlr
2021-12-05 13:21:49 +08:00
@zmxnv123 WebAssembly 吧,类似 pyodide
ch2
2021-12-05 13:29:41 +08:00
文件路径是个什么逻辑?
formulahendry
2021-12-05 14:08:21 +08:00
@zmxnv123 可以看这篇文章: https://zhuanlan.zhihu.com/p/441373442

@lmqdlr 是的! Pyodide
formulahendry
2021-12-05 14:08:40 +08:00
formulahendry
2021-12-05 14:08:52 +08:00
@infun 不支持哦~ 只能运行
formulahendry
2021-12-05 14:24:09 +08:00
@ch2 文件系统似乎是虚拟的。
Wataru
2021-12-05 16:25:31 +08:00
感谢分享
infun
2021-12-05 18:18:34 +08:00
@formulahendry 非 web 版本有没有可能支持呢?
formulahendry
2021-12-05 18:20:29 +08:00
@infun 桌面版的 VS Code 也能用的~
infun
2021-12-05 18:40:36 +08:00
@formulahendry 我在用 但是没有调试功能
ch2
2021-12-05 22:53:03 +08:00
@formulahendry #13 不能读写 workspace 的文件就很没用
iqoo
2021-12-05 23:14:09 +08:00
WebAssembly 虽简单但体积很大性能也不高。还是期待直接翻译的版本。
leoleoasd
2021-12-06 09:10:28 +08:00
打个广告,在浏览器里直接运行 clang 编译器,编译 c++程序,并在浏览器里运行:
https://github.com/eduoj/wasm-clang
用法可参考
https://github.com/EduOJ/frontend/blob/master/src/views/IDE.vue#L143-L180

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/820111

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX