{"id":18085393,"url":"https://github.com/xe/olin","last_synced_at":"2025-05-16T04:05:37.184Z","repository":{"id":32966720,"uuid":"146960461","full_name":"Xe/olin","owner":"Xe","description":"Webassembly + Event Sourcing","archived":false,"fork":false,"pushed_at":"2024-06-10T02:18:42.000Z","size":4963,"stargazers_count":523,"open_issues_count":19,"forks_count":23,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-13T12:10:02.385Z","etag":null,"topics":["abi","cwa","event-sourcing","eventbus","go","olin","rust","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Xe","patreon":"cadey","ko_fi":"A265JE0"}},"created_at":"2018-09-01T02:25:47.000Z","updated_at":"2025-03-23T08:20:58.000Z","dependencies_parsed_at":"2024-12-29T20:10:18.085Z","dependency_job_id":"8a193cc9-a9aa-4f9d-92d9-b9fd77666652","html_url":"https://github.com/Xe/olin","commit_stats":{"total_commits":178,"total_committers":7,"mean_commits":"25.428571428571427","dds":0.151685393258427,"last_synced_commit":"0cf90810960ba4d7d80e20448ec08a71a3510deb"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Folin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Folin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Folin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Folin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xe","download_url":"https://codeload.github.com/Xe/olin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464895,"owners_count":22075570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abi","cwa","event-sourcing","eventbus","go","olin","rust","webassembly"],"created_at":"2024-10-31T15:11:05.745Z","updated_at":"2025-05-16T04:05:33.188Z","avatar_url":"https://github.com/Xe.png","language":"Go","funding_links":["https://github.com/sponsors/Xe","https://patreon.com/cadey","https://ko-fi.com/A265JE0"],"categories":[],"sub_categories":[],"readme":"# olin\n\n[![Actions Status](https://github.com/Xe/olin/workflows/Tests/badge.svg)](https://github.com/Xe/olin/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/Xe/olin)](https://goreportcard.com/report/github.com/Xe/olin) [![GoDoc](https://godoc.org/github.com/Xe/olin?status.svg)](https://godoc.org/github.com/Xe/olin) ![powered by WebAssembly](https://img.shields.io/badge/powered%20by-WebAssembly-orange.svg)\n\nOlin is like the JVM for WebAssembly. It wraps WebAssembly with a set of\nfunctions to access the outside world and keeps track of things like how\nmany instructions were used, how many syscalls were made and how much memory\nwas used. This helps with profiling code.\n\nTo view Olin in action, click [here](https://olin.within.website/).\n\n## Background\n\nVery frequently, I end up needing to write applications that basically end up\nwaiting forever to make sure things get put in the right place and then the \nright code runs as a response. I then have to make sure these things get put\nin the right places and then that the right versions of things are running for\neach of the relevant services. This doesn't scale very well, not to mention is \nhard to secure. This leads to a lot of duplicate infrastructure over time and \nas things grow. Not to mention adding in tracing, metrics and log aggreation.\n\nI would like to change this.\n\nI would like to make a prescriptive environment kinda like [Google Cloud Functions][gcf]\nor [AWS Lambda][lambda] backed by a durable message queue and with handlers\ncompiled to webassembly to ensure forward compatibility. As such, the ABI \ninvolved will be versioned, documented and tested. Multiple ABI's will eventually\nneed to be maintained in parallel, so it might be good to get used to that early\non.\n\nI expect this project to last decades. I want the binary modules I upload today\nto be still working in 5 years, assuming its dependencies outside of the module \nstill work. \n\n## Blogposts\n\nBefore asking questions or using Olin in this early state, I ask you please read\nthese blogposts outlining the point of this project and some other bikeshedding\nI have put out on the topic:\n\n- https://christine.website/blog/olin-1-why-09-1-2018\n- https://christine.website/blog/olin-2-the-future-09-5-2018\n\nThese will explain a lot that hasn't been fit into here yet.\n\n## ABI's Supported\n\n### Common WebAssembly\n\nOlin includes support for binaries linked against the [Common WebAssembly](https://github.com/CommonWA/cwa-spec)\nspecification. Please see the tests in `cmd/cwa` for more information. Currently\nthe Common WebAssembly is fairly basic, but at the same time there are currently\nthe most tests targeting Common Webassembly.\nThe tests for the Common WebAssembly spec can be found [here](https://github.com/Xe/olin/blob/master/cmd/cwa/testdata/test.rs).\n\n### Go\n\nOlin also includes support for running webassembly modules created by [Go 1.12's webassembly support](https://golang.org/wiki/WebAssembly).\nIt uses [the `wasmgo` ABI][wasmgo] package in order to do things. Right now\nthis is incredibly basic, but should be extendable to more things in the future.\n\nAs an example:\n\n```go\n// +build js,wasm ignore\n// hello_world.go\n\npackage main\n\nfunc main() {\n\tprintln(\"Hello, world!\")\n}\n```\n\nwhen compiled like this:\n\n```console\n$ GOARCH=wasm GOOS=js go1.12.1 build -o hello_world.wasm hello_world.go\n```\n\nproduces the following output when run with the testing shim:\n\n```\n=== RUN   TestWasmGo/github.com/Xe/olin/internal/abi/wasmgo.testHelloWorld\nHello, world!\n--- PASS: TestWasmGo (1.66s)\n    --- PASS: TestWasmGo/github.com/Xe/olin/internal/abi/wasmgo.testHelloWorld (1.66s)\n```\n\nCurrently Go binaries cannot interface with the Dagger ABI. There is [an issue](https://github.com/Xe/olin/issues/5)\nopen to track the solution to this.\n\nFuture posts will include more detail about using Go on top of Olin. \n\nUnder the hood, the Olin implementation of the Go ABI currently uses Dagger.\n\n## Project Meta\n\nTo follow the project, check it on GitHub [here][olin]. To talk about it on Slack,\njoin the [Go community Slack][goslack] and join `#olin`. \n\n[gcf]: https://cloud.google.com/functions/\n[lambda]: https://aws.amazon.com/lambda/\n[syscall]: https://en.wikipedia.org/wiki/System_call\n[olin]: https://github.com/Xe/olin\n[goslack]: https://invite.slack.golangbridge.org\n[wasmgo]: https://github.com/Xe/olin/tree/master/internal/abi/wasmgo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxe%2Folin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxe%2Folin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxe%2Folin/lists"}