After Python, Go also runs smoothly on the browser

thumbnail

> > From the public number: OSC open source community > > >

Anaconda developers recently released Py, a framework that lets developers mix Python code in HTML, which some call "JSP for Python". In fact, Py uses WebAssembly under the hood because it is built on Pyodide, which consists of a CPython 3.8 interpreter compiled to WebAssembly, allowing Python to be run in a web browser.

Coincidentally, the developers adopted the same idea to make Go also run smoothly on the browser. The https://go.dev website supports running Go code directly on the browser side. This is a Go playground. The bottom layer uses Go and is implemented through WASM.

Go is an unofficial implementation of the Go language specification for inlining or encapsulation of Rust projects , providing an easier way to encapsulate and call the underlying Rust code. Like Lua is to Redis/WoW, or Python is to NumPy.

Go includes six projects:

  • The parser turns the source code into an AST, ported from the official Go code.
  • The type checker does type deduction and type checking based on AST, and is also ported from the official Go code.
  • codegen generates bytecode based on the AST and type information.
  • vm runs the bytecode.
  • std official library, ported from Go official library.
  • engine contains the native part of the official library, plus a simple package.

Go implements almost all features of Go (pre 1.18, so generics are not included), and some official libraries have been ported. Check out the relevant test cases that have passed https://github.com/oxfeeefeee/go/tree/master/engine /tests.

Go project code: https://github.com/oxfeeefeee/go

--- EOF ---

Recommended↓↓↓

Latest Programming News and Information | GeekBar

Related Posts