wazero
sc
wazero | sc | |
---|---|---|
54 | 17 | |
4,918 | 2,262 | |
1.6% | - | |
9.5 | 3.8 | |
5 days ago | about 2 months ago | |
Go | C | |
Apache License 2.0 | BSD 3-clause "New" or "Revised" License |
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.
wazero
-
Exploring Goja: A Golang JavaScript Runtime
While I'm sure Goja is great for just JavaScript, using something like wazero allows your app to support more languages (anything that compiles to WASM) while keeping the benefits of CGO.
https://wazero.io/
I've used Wazero myself on C++ -> WASM code but I'm sure you could use Emscripten or something to compile JavaScript to WASM.
-
Runtime code generation and execution in Go
and for reference see how it's done in wazero https://github.com/tetratelabs/wazero/blob/c397a402ad17e495a...
-
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!)
sc
- A simple hash table in C
- Advice for bigger c projects?
- sc - Common libraries and data structures for C
-
Hacker News top posts: May 17, 2022
Common libraries and data structures for C\ (107 comments)
-
Common libraries and data structures for C
Can someone tell me what is this line from sc_signal.c:247 in sc/signal/
If the way it is used requires the user to break the abstraction/encapsulation and manually buffer some fields in order not to break the data structure and leak memory, I would call that a bug.
There is one use of sc_array_clear() in the test code [1] which really makes it look as if it is being used in a way that I think (again, I haven't single-stepped this code, only read it) leaks memory.
I agree on the pain of everything being macros, it's more pain than it's worth I think and will likely lead to code duplication (and more pain in debugging, probably).
I would even go so far as to think that this kind of single-file design, where each file is independent of the others, makes it harder and more annoying to implement more complicated data structures.
[1]: https://github.com/tezc/sc/blob/master/array/array_test.c#L3...
-
Uthash β C macros for hash tables and more
https://github.com/tezc/sc/tree/master/map
For those who are interested in faster hashmaps, I tried bunch of hashmaps and this one performs better than others. This is for C. Maybe C++ has better hashmaps.
What are some alternatives?
wasmer - π The leading Wasm Runtime supporting WASIX and WASI
frr - The FRRouting Protocol Suite
wasmtime - A fast and secure runtime for WebAssembly
stage0 - A set of minimal dependency bootstrap binaries
wasmer-go - πΉπΈοΈ WebAssembly runtime for Go
libderp - C collections. Easy to build, boring algorithms. Dumb is good.
grule-rule-engine - Rule engine implementation in Golang
pottery - Pottery - A container and algorithm template library in C
yaegi - Yaegi is Another Elegant Go Interpreter
Fortress-of-Solitude - This Library has resources to solve common data structure algorithm problems like a Doubly linked list, Generic trees, Queue, Stack, and other algorithms. Each lib has an option to carry your custom data in elements. Custom data in detail, other fantastic resources.
mozjpeg - Improved JPEG encoder.
uthash - C macros for hash tables and more