Code Monkey home page Code Monkey logo

wide's Introduction

Wide

一款基于 Web 的 Go 语言 IDE




        

简介

Wide 是一款基于 Web 的 Go 语言 IDE

动机

目前较为流行的 Go IDE 都有一些缺陷或遗憾:

  • 文本编辑器类(vim/emacs/sublime/Atom 等):对于新手门槛太高,搭建复杂
  • 插件类(goclipse、IDEA 等):需要原 IDE 支持,不够专业
  • LiteIDE 界面不够 modern、goland 收费
  • 缺少网络分享、嵌入网站可运行功能

另外,Go IDE 很少,用 Go 本身开发的 IDE 更是没有,这是一次很好的尝试。关于产品定位的讨论请看这里

特性

基于 Web 的 IDE:

  • 只需要浏览器就能进行开发、运行
  • 跨平台,甚至在移动设备上
  • 易进行功能扩展
  • 易与其他系统集成
  • 极客体验

核心功能:

  • 代码高亮、折叠:Go/HTML/JavaScript/Markdown 等
  • 自动完成:Go/HTML 等
  • 编译检查:编辑器提示编译错误
  • 格式化:Go/HTML/JSON 等
  • 运行:支持同时运行多个程序
  • 代码导航:跳转到声明,查找使用,文件搜索等
  • Web 开发:前端(HTML/JS/CSS)开发支持
  • go tool:go mod/install/fmt 等
  • 项目文件导出
  • UI/编辑器多主题
  • 支持交叉编译

界面

主界面

Overview

跳转到文件

Goto File

自动完成

Autocomplete

主题

Theme

查看表达式

Show Expression Info

构建报错提示

Build Error Info

交叉编译

Cross-Compilation

Playground

Playground

架构

构建与运行

Build & Run

  • 一个浏览器 tab 对应一个 Wide 会话
  • 通过 WebSocket 进行程序执行输出推送
  1. 客户端浏览器发送 Build 请求
  2. 服务器使用 os/exec 执行 go build 命令
    2.1. 生成可执行文件
  3. 客户端浏览器发送 Run 请求
  4. 服务器使用 os/exec 执行文件
    4.1. 生成进程
    4.2. 运行结果输出到 WebSocket 通道
  5. 客户端浏览器监听 ws.onmessage 到消息后做展现

代码辅助

  • 自动完成
  • 查找使用
  1. 浏览器客户端发送代码辅助请求
  2. Handler 根据请求对应的 HTTP 会话获取用户工作空间
  3. 执行 gocode/ide_stub(gotools) 命令
    3.1 设置环境变量(${GOPATH} 为用户工作空间路径)
    3.2 gocode 命令需要设置参数 lib-path

文档

社区

授权

Wide 使用 Apache License, Version 2 开源协议。

鸣谢


开源项目推荐

  • 如果你需要搭建一个个人博客系统,可以考虑使用 Solo
  • 如果你需要搭建一个多用户博客平台,可以考虑使用 Pipe
  • 如果你需要搭建一个社区平台,可以考虑使用 Sym
  • 欢迎加入我们的小众开源社区,详情请看这里

wide's People

Contributors

88250 avatar admpub avatar avivrubys avatar codeskyblue avatar gaomd avatar gitter-badger avatar gitwillsky avatar haraldnordgren avatar khjde1207 avatar mattn avatar muyuballs avatar paladintyrion avatar shiyou0130011 avatar thewhitetulip avatar tjyang avatar vanessa219 avatar yougg avatar youymi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.