Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hexops/vecty
Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
https://github.com/hexops/vecty
dynamic frontend go gopherjs javascript react responsive tinygo vecty vue webassembly
Last synced: 7 days ago
JSON representation
Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
- Host: GitHub
- URL: https://github.com/hexops/vecty
- Owner: hexops
- License: bsd-3-clause
- Created: 2014-11-03T00:32:48.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2022-10-16T21:47:38.000Z (about 2 years ago)
- Last Synced: 2024-09-28T17:43:16.166Z (2 months ago)
- Topics: dynamic, frontend, go, gopherjs, javascript, react, responsive, tinygo, vecty, vue, webassembly
- Language: Go
- Homepage:
- Size: 772 KB
- Stars: 2,801
- Watchers: 80
- Forks: 143
- Open Issues: 58
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- my-awesome - hexops/vecty - 10 star:2.8k fork:0.1k Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS. (Go)
- awesome-ccamel - hexops/vecty - Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS. (Go)
- awesome-golang-repositories - vecty
README
Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
[![Build Status](https://travis-ci.org/hexops/vecty.svg?branch=master)](https://travis-ci.org/hexops/vecty) [![PkgGoDev](https://pkg.go.dev/badge/github.com/hexops/vecty)](https://pkg.go.dev/github.com/hexops/vecty) [![GoDoc](https://godoc.org/github.com/hexops/vecty?status.svg)](https://godoc.org/github.com/hexops/vecty) [![codecov](https://img.shields.io/codecov/c/github/hexops/vecty/master.svg)](https://codecov.io/gh/hexops/vecty)
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).Vecty vs. Vugu
==============If you're wondering if you should use Vecty or [Vugu](https://www.vugu.org/), consider reading [this Twitter thread](https://twitter.com/JohanBrandhorst/status/1452393594283831297) for advice from both myself and the creator of Vugu.
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](https://github.com/hexops/vecty/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0) 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 ](https://github.com/hexops/vecty/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0)
- The scope of Vecty is only ~80% defined currently.
- There are a number of important [open issues](https://github.com/hexops/vecty/issues).For a list of projects currently using Vecty, see the [doc/projects-using-vecty.md](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.19` | 5.9M | 1.3M | 952K |
| `todomvc.wasm` | `go 1.15` | 2.9M | 825K | 617K |You can find these examples under the [example](./example) directory along with a readme on how to go about running a vecty project.
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
=========- Join us in the [#vecty](https://gophers.slack.com/messages/vecty/) channel on the [Gophers Slack](https://gophersinvite.herokuapp.com/)!
- See what [projects use Vecty in the wild](https://github.com/hexops/vecty/blob/main/doc/projects-using-vecty.md)Changelog
=========See the [doc/CHANGELOG.md](doc/CHANGELOG.md) file.