uniffi-rs
wasmer-go
Our great sponsors
uniffi-rs | wasmer-go | |
---|---|---|
26 | 11 | |
2,278 | 2,729 | |
5.0% | 1.0% | |
9.5 | 0.0 | |
6 days ago | 4 months ago | |
Rust | Go | |
Mozilla Public License 2.0 | MIT 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.
uniffi-rs
-
Opaque Types for UniFFI
On my youtube series "Growing up Rust", I'm building a personal CRM in Rust with a Swift frontend. I'm using CQRS and an event-driven architecture with the least amount of swift as possible. I'm using UniFFI to generate the bindings for swift (and in this example python)
-
Willow Protocol
Not officially. We currently have bindings for rust, python, golang and swift.
These were the most asked for bindings (python for ml, golang for networking and swift for ios apps).
We are using uniffi https://mozilla.github.io/uniffi-rs/
Would you need C or C++ bindings?
- UniFFI: Automatically generate foreign-language bindings for Rust libraries
- Compiling Rust for .NET, using only tea and stubbornness
-
Show HN: Pip Imports in Deno
An alternative is metacall. The example in the readme is about calling Python from Javascript, but it also works with other languages, like Ruby, C#, Java, and other languages
https://github.com/metacall/core
List of supported languages here https://github.com/metacall/core/blob/develop/docs/README.md...
In the future, maybe webidl (or extensions of it) will bring interoperability between languages too. At the moment there is https://mozilla.github.io/uniffi-rs/ for interoperability between Rust and a number of languages (basically the ones mozilla needs: Swift, Kotlin, Javascript)
-
ffizz: Build a Beautiful C API in Rust
The tooling for the first kind -- calling Rust from another language -- is a bit less developed, and tends to rely on code generation that doesn't necessarily produce a natural C API. cbindgen, uniffi, cxx, and Diplomat all take this course.
-
macOS Apps in Rust
Mozilla's uniffi-rs is really good. You write a common IDL and the bindings are generated automatically.
https://github.com/mozilla/uniffi-rs
-
Write SDK “base” in Rust, wrap in other languages?
At Mozilla we built a multi-language bindings generator: https://github.com/mozilla/uniffi-rs/
-
An experiment in the Rust compiler to begin devising a new cross-language ABI that's higher-level than the C ABI, with the goal of safer and easier FFI
Is there a connection with Mozilla UniFFI ?
-
Tauri now supports Android/iOS in the 2.0 branch!
Rust <> Swift/ Kotlin works very well with uniffi-rs by Mozilla: https://github.com/mozilla/uniffi-rs
wasmer-go
-
Running WebAssembly code in Go
The next step is to create a Go project and run our wasm file with some runtime. For this, I chose wasmer-go.
-
Running Go code inside a NodeJS app with WASM (Part 1/2, 2023)
However, there are other, more fleshed-out, libraries like wasmer-go that provides a runtime and help us navigate around these limitations. The wasmer-go documentation provides a good summary of these challenges:
-
How to develop a Web app in go
wasmer-go
-
Plugo - A plugin library for Go.
I did some research and found a WebAssembly runtime that can run Go code that has been compiled to WASM. It seems to me that one could implement a plugin system using this. I might try.
-
The Carcinization of Go Programs
Thank you Syrus, appreciate your work with Wasmer. Congrats on the 3.0 release and Windows support! I just fixed guregu/trealla on WAPM to work with the latest changes. I think WAPM is very cool and I hope more people start doing releases on it.
These are the two issues I'm referring to:
https://github.com/wasmerio/wasmer-go/pull/200
https://github.com/wasmerio/wasmer-go/pull/286
-
First steps with Golang and WebAssembly
Time to implement the other side of the story. I have found a WebAssembly runtime for Go. Wasmer-go is a complete and mature WebAssembly runtime for Go based on Wasmer.
-
Choosing scripting extension - need advice
If performance is your main concern, there's Wasmer-go, but if you'd rather avoid CGO dependencies, there's wazero.
-
WASM without Node.js?
See wasmer-go for server-side runtime.
-
Options for running WASM in Go?
I've been looking at wasmer-go, and it seems to be quite performant given that the runtime is written in Rust and invoked through CGo bindings. Is this what everyone is using?
-
Trying to write a cross-language library
Go: I don't know of anything higher-level than either exposing a C ABI from Rust and then calling it using cgo or using wasmer-go to embed a WebAssembly runtime in your Go program.
What are some alternatives?
flutter_rust_bridge - Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
napi-rs - A framework for building compiled Node.js add-ons in Rust via Node-API
rust-android-gradle
wazero - wazero: the zero dependency WebAssembly runtime for Go developers
PyO3 - Rust bindings for the Python interpreter
wasmtime-go - Go WebAssembly runtime powered by Wasmtime
cxx - Safe interop between Rust and C++
glommio - Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
grule-rule-engine - Rule engine implementation in Golang
buttplug-rs - Rust Implementation of the Buttplug Sex Toy Control Protocol
SWIG - SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.