• Stars
    star
    2,736
  • Rank 15,978 (Top 0.4 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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).

Vecty vs. Vugu

If you're wondering if you should use Vecty or Vugu, consider reading this Twitter thread 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 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.19 5.9M 1.3M 952K
todomvc.wasm go 1.15 2.9M 825K 617K

You can find these examples under the 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

Changelog

See the doc/CHANGELOG.md file.

More Repositories

1

dockerfile

Dockerfile best-practices for writing production-worthy Docker images.
Dockerfile
4,012
star
2

mach

zig game engine & graphics toolkit
Zig
2,613
star
3

mach-glfw

Ziggified GLFW bindings with 100% API coverage, zero-fuss installation, cross compilation, and more.
Zig
317
star
4

valast

Convert Go values to their AST
Go
298
star
5

autogold

Automatically update your Go tests
Go
271
star
6

fastfilter

fastfilter: Binary fuse & xor filters for Zig (faster and smaller than bloom filters)
Zig
231
star
7

mach-core

window+input+GPU, truly cross-platform
Zig
181
star
8

mach-gpu

mach/gpu: truly cross-platform WebGPU graphics for Zig
Zig
154
star
9

mach-gpu-dawn

Google's Dawn WebGPU implementation, cross-compiled with Zig into a single static library
Zig
140
star
10

gotextdiff

Unified text diffing in Go (copy of the internal diffing packages the officlal Go language server uses)
Go
124
star
11

mach-examples

Mach engine examples
Zig
86
star
12

mach-sysgpu

Highly experimental, blazingly fast, lean & mean descendant of WebGPU written in Zig
Zig
82
star
13

dawn

Fork of dawn.googlesource.com/dawn with generated code and third-party dependencies committed
C++
76
star
14

zorex

Zorex: the omnipotent regex engine
Zig
65
star
15

Azure-Kinect-Python

Python 3 bindings for the Azure Kinect SDK
Python
48
star
16

mach-freetype

Ziggified Freetype 2 bindings with zero-fuss installation, cross compilation, and more.
Zig
45
star
17

mach-glfw-vulkan-example

mach-glfw Vulkan example
Zig
37
star
18

mach-ecs

Entity Component System from first-principles designed for Zig
Zig
35
star
19

zgo

Go + Zig = 💕 | Zig and Go are best friends
Go
35
star
20

mach-dxcompiler

DXC built using Zig
C++
34
star
21

mach-glfw-opengl-example

Example for using mach-glfw with zig-opengl
Zig
32
star
22

mach-sysjs

enables Zig/WASM to speak to JavaScript
Zig
26
star
23

mach-sysaudio

cross-platform low-level audio IO in Zig
Zig
26
star
24

awesome-zig-gamedev

Comprehensive collection of maintained zig gamedev projects & libraries
17
star
25

xcode-frameworks

XCode frameworks packaged for the Zig build system
C
17
star
26

mach-gamemode

mach-gamemode: make your Linux games go brrr
Zig
14
star
27

mach-core-starter-project

The result of running through https://machengine.org/core/getting-started
Zig
13
star
28

pgtrgm_emperical_measurements

Emperical measurements of pg_trgm performance at scale
Shell
11
star
29

zigmonthly.org

Curated Zig news brought to you by @slimsag each month
SCSS
11
star
30

mach-system-sdk

DirectX 12 headers for MinGW/Zig, cross-compile DX12/Metal/etc with Zig, etc.
10
star
31

brotli

A fork of brotli packaged for the Zig build system
C
10
star
32

cmder

Lightweight Go pattern for writing CLIs with subcommands
Go
10
star
33

harfbuzz

A fork of harfbuzz packaged for the Zig build system
C++
10
star
34

sdk-macos-11.3

Also see https://github.com/hexops/sdk-macos-12.0
C
9
star
35

libmach

C API to Mach core and Mach engine
C
9
star
36

glfw

A fork of GLFW packaged for the Zig build system
C
8
star
37

wrench

[bot] 🐵 Wrench here! Let's fix this! 🔧
Go
8
star
38

freetype

A fork of freetype packaged for the Zig build system
C
8
star
39

machengine.org

machengine.org website, documentation, etc.
SCSS
8
star
40

mach-editor

Mach CLI and graphical editor
Zig
8
star
41

sinter

Sinter text search engine
Zig
7
star
42

devlog

Hexops devlog
SCSS
7
star
43

vulkan-zig-generated

Snektron/vulkan-zig, but generated and comitted for use as a package manager dependency
Zig
7
star
44

vulkan-headers

A fork of vulkan-headers packaged for the Zig build system
C++
7
star
45

mach-model3d

compact, featureful model format & alternative to glTF
C
7
star
46

font-assets

Various fonts packaged for the Zig build system
Zig
7
star
47

mach-opus

Opus audio decoding and encoding for Zig via the battle-hardened xiph.org libopus
Zig
6
star
48

basisu

A fork of basisu packaged for the Zig build system
C
6
star
49

sdk-macos-12.0

macOS 12.0 Monterey SDK for Mach engine
C
6
star
50

mach-objc

Generated Objective-C bindings for Zig
Zig
5
star
51

linux-audio-headers

linux-audio-headers packaged for the Zig build system
C
5
star
52

mach-flac

FLAC audio decoding and encoding for Zig via the battle-hardened xiph.org libflac
Zig
5
star
53

x11-headers

x11-headers packaged for the Zig build system
C
5
star
54

mach-rs

Rust bindings for Mach
5
star
55

mach-basisu

basis universal (supercompressed textures) for Zig
Zig
5
star
56

direct3d-headers

Enables using the latest Direct3D headers and libraries with Zig
C
4
star
57

ControlCursor

A C# library for getting and setting global cursor position.
C#
4
star
58

hexi-old

Hexi: Game Engine & Graphics Toolkit
Rust
4
star
59

wayland-headers

wayland-headers packaged for the Zig build system
C
4
star
60

spirv-cross

A fork of spirv-cross packaged for the Zig build system
C++
3
star
61

spirv-tools

A fork of spirv-tools packaged for the Zig build system
C++
3
star
62

hexops.com

hexops.com website
SCSS
3
star
63

opengl-headers

opengl-headers packaged for the Zig build system
C
3
star
64

soundio

libsoundio upstream sources used by Mach engine
C
3
star
65

sdk-macos-13.3

macOS 13.3 Ventura SDK for Mach engine
C
3
star
66

sdk-linux-x86_64

Linux x86_64 SDK for Mach engine
C++
3
star
67

mach-ggml

Zig
3
star
68

mach-core-example-assets

mach-core examples assets
Zig
2
star
69

sdk-linux-aarch64

Linux aarch64 SDK for Mach engine
C++
2
star
70

opusfile

A fork of opusfile packaged for the Zig build system
C
2
star
71

ogg

A fork of ogg packaged for the Zig build system
C
2
star
72

sdk-windows-x86_64

Windows x86_64 SDK for Mach engine
C
2
star
73

mach-objc-generator

Zig Objective-C binding generator
Zig
2
star
74

mach-example-assets

Example assets for Mach engine
1
star
75

ztemplate

Hexops Zig template repository
Zig
1
star
76

tridex-assets

Static contents / assets for Tridex
1
star
77

opus

A fork of opus packaged for the Zig build system
C
1
star
78

opusenc

A fork of libopusenc packaged for the Zig build system
C
1
star
79

directx-headers

A fork of DirectX-Headers, packaged with the Zig build system and compatible with cross-compilation
C
1
star
80

flac

A fork of flac packaged for the Zig build system
C
1
star