javy
wazero
javy | wazero | |
---|---|---|
6 | 52 | |
0 | 4,550 | |
- | 1.6% | |
5.3 | 9.8 | |
12 months ago | 9 days ago | |
Rust | Go | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
javy
-
Are there plans for WebAssembly as compilation target?
I don't think you can compile JS to WASM... You can run your JS code in a sandboxed runtime implemented in WebAssembly, which... I guess gives you sandboxing, but not much else.
-
Is it possible to run a containerized SvelteKit/Node-based website as WASM module?
Yes exactly! Thanks for nudging me in the direction of: - https://github.com/Shopify/javy - https://github.com/WebAssembly/design/issues/219
-
QuickJS Running in WebAssembly
Iām not sure if anyone has done so yet for Go, but Shopify has done this for Rust.
https://github.com/Shopify/javy/tree/main/crates/quickjs-was...
-
Wasmtime 1.0
> - JS is notably missing from the list of languages supported on the front page. But I see mentions of a Spidermonkey.wasm in the blog post. Is running JS on top of wasmtime in production a realistic prospect today? If so, where can I read more? (mainly interested in this for the instantiation time benefits, though maybe all/most of that will be negated by the embedded JS engine?)
Shopify and others use QuickJS as their JS engine of choice. See https://github.com/Shopify/javy as a starting point. The real benefit is allowing authors of plugins to write JS and not AssemblyScript, not any performance or instantiation time benefits.
> - How should I go about building a typical web service on top of wasmtime? Can wasmtime itself handle network requests/connections or would I need to build the web server in some other host language and pass request data to wasmtime modules? Haven't been able to find anything in the docs about this.
There are a lot of choices for this. None I would consider mature, but some leads:
- https://github.com/deislabs/wagi
-
Announcing support for WASI on Cloudflare Workers
You will need to use something like javy which incidentally accepts input via stdin and produces output via stdout which would work perfectly (to my knowledge) as a wasi worker.
-
The State of WebAssembly 2022
yes it has, https://github.com/Shopify/javy among others
wazero
-
Wazero: The zero dependency WebAssembly runtime
https://github.com/tetratelabs/wazero/releases/tag/v1.7.0
This includes the final release of the new optimizing compiler, which is a big improvement over the previous one.
The new version also adds experimental support for threads and snapshot/restore (setjmp/longjmp).
This is already being used by go-pgquery, all will mean that sqlc won't need to ship to almost copies of wazero (these features had been implemented on a friendly fork, and have now been up-streamed).
- Wazero v1.6.0
- Show HN: My Go SQLite driver did poorly on a benchmark, so I fixed it
-
Making Games in Go for Absolute Beginners
> Go actually has one of the best WASM runtimes https://github.com/tetratelabs/wazero
-
WASM by Example
Wazero looks super cool. I saw somewhere that programs can be run with a timeout, which sounds great for sandboxing. The program input is just a slice of bytes [1], so an interesting use case would be to use something like Nats [2] to distribute programs to different servers. Super simple distributed computing!
--
1: https://github.com/tetratelabs/wazero/blob/main/examples/bas...
2: https://natsbyexample.com/examples/messaging/pub-sub/go
-
Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
It is slower.
The WASM runtime wazero [1] uses a compiler on amd64 and arm64 (on Linux, macOS, Windows, and FreeBSD), but the current compiler is very fast (at compiling), but very naive (generates less than optimal code).
An optimizing compiler is currently being developed, and should be released in the coming months. I'm optimistic that this compiler will cover the performance gap between WASM and modernc.
[1]: https://wazero.io
-
Jacobin: Minimal JVM written in Go and capable of running Java 17 classes
I am a fan of the Jacobin project! For your uses, you may also want to consider wazero [1], a pure-go WebAssembly runtime. Full disclosure: I am on the team :)
[1]: https://wazero.io/
-
Val, a high-level systems programming language
No longer does Wasm/WASI need JS host! There are many spec-compliant runtimes built for environments from tiny embedded systems up to beefy arm/x86 racks:
- https://github.com/bytecodealliance/wasm-micro-runtime
- https://github.com/bytecodealliance/wasmtime
- https://github.com/wasmerio/wasmer
- https://github.com/tetratelabs/wazero
- https://github.com/extism/extism (disclaimer, my company's project - makes wasm easily embeddable into 16+ programming languages!)
-
WebAssembly and Replayable Functions
full disclosure: I don't work on it, but the devs are committers/contributors to https://wazero.io (I am a wazero committer) :)
- Wazero: Zero dependency WebAssembly runtime written in Go
What are some alternatives?
Viceroy - Viceroy provides local testing for developers working with Compute.
wasmer - š The leading Wasm Runtime supporting WASIX, WASI and Emscripten
wasmtime - A fast and secure runtime for WebAssembly
wizard-engine - Research WebAssembly Engine
wasmer-go - š¹šøļø WebAssembly runtime for Go
spidermonkey-wasi-embedding
grule-rule-engine - Rule engine implementation in Golang
define-function - quick.js based eval
yaegi - Yaegi is Another Elegant Go Interpreter
lunatic - Lunatic is an Erlang-inspired runtime for WebAssembly
gc - Branch of the spec repo scoped to discussion of GC integration in WebAssembly