• Stars
    star
    520
  • Rank 83,125 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 17 days ago

Reviews

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

Repository Details

Webassembly + Event Sourcing

olin

Actions Status Go Report Card GoDoc powered by WebAssembly

Olin is like the JVM for WebAssembly. It wraps WebAssembly with a set of functions to access the outside world and keeps track of things like how many instructions were used, how many syscalls were made and how much memory was used. This helps with profiling code.

To view Olin in action, click here.

Background

Very frequently, I end up needing to write applications that basically end up waiting forever to make sure things get put in the right place and then the right code runs as a response. I then have to make sure these things get put in the right places and then that the right versions of things are running for each of the relevant services. This doesn't scale very well, not to mention is hard to secure. This leads to a lot of duplicate infrastructure over time and as things grow. Not to mention adding in tracing, metrics and log aggreation.

I would like to change this.

I would like to make a prescriptive environment kinda like Google Cloud Functions or AWS Lambda backed by a durable message queue and with handlers compiled to webassembly to ensure forward compatibility. As such, the ABI involved will be versioned, documented and tested. Multiple ABI's will eventually need to be maintained in parallel, so it might be good to get used to that early on.

I expect this project to last decades. I want the binary modules I upload today to be still working in 5 years, assuming its dependencies outside of the module still work.

Blogposts

Before asking questions or using Olin in this early state, I ask you please read these blogposts outlining the point of this project and some other bikeshedding I have put out on the topic:

These will explain a lot that hasn't been fit into here yet.

ABI's Supported

Common WebAssembly

Olin includes support for binaries linked against the Common WebAssembly specification. Please see the tests in cmd/cwa for more information. Currently the Common WebAssembly is fairly basic, but at the same time there are currently the most tests targeting Common Webassembly. The tests for the Common WebAssembly spec can be found here.

Go

Olin also includes support for running webassembly modules created by Go 1.12's webassembly support. It uses the wasmgo ABI package in order to do things. Right now this is incredibly basic, but should be extendable to more things in the future.

As an example:

// +build js,wasm ignore
// hello_world.go

package main

func main() {
	println("Hello, world!")
}

when compiled like this:

$ GOARCH=wasm GOOS=js go1.12.1 build -o hello_world.wasm hello_world.go

produces the following output when run with the testing shim:

=== RUN   TestWasmGo/github.com/Xe/olin/internal/abi/wasmgo.testHelloWorld
Hello, world!
--- PASS: TestWasmGo (1.66s)
    --- PASS: TestWasmGo/github.com/Xe/olin/internal/abi/wasmgo.testHelloWorld (1.66s)

Currently Go binaries cannot interface with the Dagger ABI. There is an issue open to track the solution to this.

Future posts will include more detail about using Go on top of Olin.

Under the hood, the Olin implementation of the Go ABI currently uses Dagger.

Project Meta

To follow the project, check it on GitHub here. To talk about it on Slack, join the Go community Slack and join #olin.

More Repositories

1

site

The new frontend/backend code for https://xeiaso.net
MDX
606
star
2

nixos-configs

My NixOS configs
Nix
315
star
3

Xess

My minimal Gruvbox CSS file I've been keeping multiple places
CSS
192
star
4

xn--ts9h

πŸ₯Ί is sudo at home
Nix
163
star
5

waifud

For your server and all of its waifus <3
Rust
155
star
6

when-then-zen

Meditation instructions from spiritual texts ripped out of the contexts of their spirituality and presented in the universal format of Gherkin
Gherkin
144
star
7

x

Various tools, trinkets and experiments
Go
141
star
8

Xeact

A high performance, developer-efficient and overall ballin' femtoframework for productive development in Javascript
JavaScript
114
star
9

pahi

The next-generation Olin runtime, made with love
Rust
66
star
10

creators-code

A minimal alternative for other codes of conduct I have seen.
53
star
11

furry-happiness

A proof of concept dockerfile that uses user mode linux
Dockerfile
52
star
12

ln

The natural log function
Go
40
star
13

flake-configs

My NixOS configs as a flake
Nix
39
star
14

invocations

spoken word invocations for Talon
Talon
37
star
15

within-terraform

Some mucking about with terraform and a wrapper tool in Nim
Shell
36
star
16

PonyAPI

A simple REST API for My Little Pony: Friendship is Magic episodes and many clients for it
Nim
36
star
17

automuse

Xe's stupid novel generation trickery
Typst
33
star
18

flitter

Minimal Docker PaaS
Go
33
star
19

minicompiler

An implementation of Terry Davis' minicompiler in Rust targeting WebAssembly
Rust
33
star
20

TempleOS-tools

Tools and scripts I make for using TempleOS
JavaScript
31
star
21

helloworld

A sample Rust+Nix project for a blogpost
Nix
29
star
22

lokahi

Lokahi is a HTTP uptime and response time monitoring service
Go
28
star
23

pronouns

A service to help people with pronoun inflections.
Rust
28
star
24

TempleOS

Talk to God on up to 64 cores
C++
26
star
25

gopreload

LD_PRELOAD for the gopher crowd
Go
25
star
26

xn--g28h

πŸ˜‚ is a self-hostable blog engine built on the tech that powers xeiaso.net
TypeScript
24
star
27

dev

A simple tool for provisioning Docker containers for development
Go
20
star
28

nixexpr

Nix expressions for JavaScript
JavaScript
19
star
29

automagic-terraform-nixos

An example for a blogpost about gluing Terraform and Nix flakes together
HCL
19
star
30

withinbot

Within's Discord Bot
Dhall
18
star
31

hlang

The h programming language
Go
17
star
32

mi.rs

A personal API
Rust
17
star
33

node-yeet

Yeets stuff up the stack
JavaScript
16
star
34

dockerfiles

Assorted dockerfiles
Dockerfile
14
star
35

printerfacts

The printer facts API in Rust
Rust
14
star
36

douglas-adams-quotes

An example repo full of Douglas Adams quotes
CSS
14
star
37

iosevka

The Iosevka Iaso font set
Nix
13
star
38

nelo

Xe's RISCV kernel/OS for learning RISCV
Rust
13
star
39

wallpapers

My public wallpapers for consumption by downstream projects
Nix
13
star
40

gohello

Nix
12
star
41

gamebridge

A simple bridge into games that use N64-style controller input
Rust
12
star
42

furbooru

Furbooru API client in Rust
Rust
11
star
43

Ponifuse

Ponifies files at load and de-ponifies them at write time (fuse module)
Python
11
star
44

xultybau

Metalanguage analysis
Go
11
star
45

GraphvizOnline

Let's Graphviz it Online
JavaScript
11
star
46

pathwalk

Some really simple path walking tools and utilities for Haskell.
Haskell
10
star
47

twirp-codegens

Code generators for twirp
Go
10
star
48

dotfiles

My dotfiles
Emacs Lisp
9
star
49

derpigo

Derpibooru API bindings in Go
Go
9
star
50

Xe

My README
9
star
51

maison

A dashboard for our apartment
JavaScript
9
star
52

Tetra

Next generation extended services for TSora
Go
9
star
53

templates

Nix Flake Templates
Nix
9
star
54

withinbot-old

A chatbot in Rust
Rust
9
star
55

christine.website

The code that used to power my site
MoonScript
8
star
56

blog-nixos-configs

A nixos-configs example for a blogpost
Nix
8
star
57

printerfacts-old

This service replies with useful and informative facts about printers.
Go
8
star
58

music

Orca + Yoshimi experiments
Nix
7
star
59

assimil8

Assimilate a machine so you can do what you need to it
Go
7
star
60

timtcana

The code powering a weather station in my apartment
Rust
7
star
61

crowley

A HTTP router built to scale
7
star
62

code

Code dump. Code here may or may not be used.
C
7
star
63

macarena

A relay bot for IRC channels spanning many networks
Go
7
star
64

IdrA

Linux at a high APM
Nix
7
star
65

Xeact-html

HTML generation femtoframework addon for the Xeact femtoframework
JavaScript
7
star
66

rhea

A gemini server
Go
7
star
67

surl

My simple URL shortener for my internal network.
Nim
6
star
68

lolcode.vim

LOLCODE highlighting for Vim
Vim Script
6
star
69

xesite_android

https://christine.website but in an Android app for no reason!
Kotlin
6
star
70

eclier

A simple subcommand router for programs written in Go with Lua scripting
Go
6
star
71

novos

A capability based microkernel OS.
Rust
6
star
72

mimi

My chatbot
TypeScript
5
star
73

olegdb-ee

OlegDB: Enterprise Edition
Go
5
star
74

sh0rkchat

Sh0rk Chat!
JavaScript
5
star
75

hbot

The h IRC bot, reloaded
Nim
5
star
76

rebootr

Reboot Heroku dynos from your phone
Dart
4
star
77

since

.i le mi nundambysince
Nim
4
star
78

dev-printerfact-on-nixos

Nix
4
star
79

mara-sh0rk-of-justice

The source code for Mara: Sh0rk of Justice
4
star
80

cfg

My dotfiles, 2.0
Lua
4
star
81

argument_parser

Nim Argument parser
Nim
4
star
82

bsnk

My battlesnake.io bot
Go
4
star
83

aports

My custom alpine linux aports
Shell
4
star
84

tarot

A tarot reading aid app in Elm
Nix
3
star
85

cipnitavla

Literally birdspeak, a stupid clone of twitter so I can learn the Rails maymay.
Ruby
3
star
86

ipcloak.rb

Elemental-ircd's IP/Host cloaking module ported to a ruby extension
C
3
star
87

lojban

.i ti cu tutci be la lojban
3
star
88

johaus

A parser for lojban dialects, forked from https://github.com/eaburns/johaus
Go
3
star
89

palworld-server

A palworld server on fly.io! palworld.within.lgbt
Shell
3
star
90

kinq

A private link aggregator that feeds from Discord
Go
3
star
91

jbo

A lot of really bad ideas
Haskell
3
star
92

pawd

The fuzzy package meta-repository for Alpine and Adelie Linux users (PPA/COPR equivalent)
Go
3
star
93

gcss

The classic gcss remade for the modern era!
Go
3
star
94

waffle

A simple STOMP library
Nim
3
star
95

disrelay

A simple IRC <-> Discord relay that doesn't make you want to cry
Go
3
star
96

scron

Simple cron daemon
C
3
star
97

hideyhole-site

A webapp written in Martini, served with backplane, authentication via Discord, and basic message board stuff.
Go
3
star
98

cbaas

Chatbot as-a-service, instant configurable chatbots for IRC, Slack, Discord and Telegram.
Python
3
star
99

confyg

A suitably generic form of the Go module configuration file parser
Go
3
star
100

prepare-unforeseen-consequences

The talk script and bibliography for my AI Ethics talk at AI Tinkerers Ottawa 2.0
TeX
3
star