Code Monkey home page Code Monkey logo

vecty's Introduction

Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.

Build Status PkgGoDev GoDoc codecov

Benefits

  • Go developers can be competitive frontend developers.
  • Share Go code between your frontend & backend.
  • Reusability by sharing components via Go packages so that others can simply import them.

Goals

  • Simple
    • Designed from the ground up to be easily mastered by newcomers (like Go).
  • Performant
    • Efficient & understandable performance, small bundle sizes, same performance as raw JS/HTML/CSS.
  • Composable
    • Nest components to form your entire user interface, seperating them logically as you would any normal Go package.
  • Designed for Go (implicit)
    • Written from the ground up asking the question "What is the best way to solve this problem in Go?", not simply asking "How do we translate $POPULAR_LIBRARY to Go?"

Features

  • Compiles to WebAssembly (via standard Go compiler).
  • Small bundle sizes: 0.5 MB hello world (see section below).
  • Fast expectation-based browser DOM diffing ('virtual DOM', but less resource usage).

Current Status

Vecty is currently considered to be an experimental work-in-progress. Prior to widespread production use, we must meet our v1.0.0 milestone goals, which are being completed slowly and steadily as contributors have time (Vecty is over 4 years in the making!).

Early adopters may make use of it for real applications today as long as they are understanding and accepting of the fact that:

  • APIs will change (maybe extensively).
  • A number of important things are not ready:
    • Extensive documentation, examples and tutorials
    • URL-based component routing
    • Ready-to-use component libraries (e.g. material UI)
    • Server-side rendering
    • And more, see milestone: v1.0.0
  • The scope of Vecty is only ~80% defined currently.
  • There are a number of important open issues.

For a list of projects currently using Vecty, see the doc/projects-using-vecty.md file.

Near-zero dependencies

Vecty has nearly zero dependencies, it only relies on reflect from the Go stdlib. Through this, it is able to produce the smallest bundle sizes for Go frontend applications out there, limited only by the Go compiler itself:

Example binary Compiler uncompressed gzip --best brotli
hellovecty.wasm tinygo 0.14.0 252K 97K 81K
hellovecty.wasm go 1.15 2.1M 587K 443K
markdown.wasm go 1.15 3.6M 1010K 745K
todomvc.wasm go 1.15 2.9M 825K 617K

Note: Bundle sizes above do not scale linearly with more code/dependencies in your Vecty project. hellovecty is the smallest base-line bundle that the compiler can produce with just Vecty as a dependency, other examples above pull in more of the Go standard library and you would not e.g. have to pay that total cost again.

Community

Changelog

See the doc/CHANGELOG.md file.

vecty's People

Contributors

slimsag avatar pdf avatar neelance avatar dmitshur avatar dave avatar tbruyelle avatar bzub avatar ilmanzo avatar nathanhack avatar damz avatar gernest avatar kigamittsu avatar marwan-at-work avatar mewmew avatar fanan avatar

Watchers

James Cloos 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.