libddwaf
wazero
libddwaf | wazero | |
---|---|---|
1 | 55 | |
34 | 5,013 | |
- | 2.0% | |
8.6 | 9.4 | |
10 days ago | 12 days ago | |
C++ | Go | |
GNU General Public License v3.0 or later | 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.
libddwaf
-
Go 1.21 will (likely) have a static toolchain on Linux
Even in C there can be issues. the nokigiri ruby gem builds (or used to build) libxml and libxslt (which are pure C) and has to make effort remove a couple of GNUisms.
For C++ we were faced with some issues, so the process we ended up with is:
- build musl, install it in some location
- inject a few GCC libs and linux headers required for C runtime to have the above location be a proper sysroot for clang to use
- build LLVM libc++ and a few libs (e.g libunwind) as static libs against that sysroot using clang, and inject them into the sysroot
- build whatever C++ final product we want against the sysroot using clang, statically linking libc++ in
- for a dynamic lib, remove dynamic reference to some shared libs (can't recall if it's libc.so or ld.so). also, hide all symbols from libc++ and load with bind local so that when loaded the shared lib prefers its internal symbols (which would make it crash if it jumps to another libc++) and does not pollute the symbol namespace with its internal ones (which would make another lib crash if it jumps to the internal libc++)
- for an executable binary instead of a lib, dynamic reference would instead need to be altered so that it works for both
It all hinges on musl being a subset of glibc, which is not entirely true either (see the musl website for differences in behaviour, which may or may not matter depending on the piece of software)
https://github.com/DataDog/libddwaf/blob/c6a90d39d93f04ebb5e...
wazero
- Show HN: Wazero compiler ported to 4 new OSes
-
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/
What are some alternatives?
sokol-tools - Command line tools for use with sokol headers
wasmer - π The leading Wasm Runtime supporting WASIX and WASI
gcc-static-linking
wasmtime - A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
go - The Go programming language
wasmer-go - πΉπΈοΈ WebAssembly runtime for Go
evcxr
grule-rule-engine - Rule engine implementation in Golang
yaegi - Yaegi is Another Elegant Go Interpreter
sc - Common libraries and data structures for C.
mozjpeg - Improved JPEG encoder.
gc - Branch of the spec repo scoped to discussion of GC integration in WebAssembly