Re:Varlink – IPC to replace D-Bus gradually in systemd
by otabdeveloper4 on Sunday September 29, 2024 @02:34PM
(#41689367)
Sorry, but bash isn't a "niche language" and it doesn't have an FFI story.
Re:Varlink – IPC to replace D-Bus gradually in systemd
by eep_social on Sunday September 29, 2024 @03:13PM
(#41689629)
Behold, FFI for bash: https://github.com/taviso/ctypes.sh
Re:Varlink – IPC to replace D-Bus gradually in systemd
by jchw on Sunday September 29, 2024 @02:40PM
(#41689412)
I don't know how to tell you this, but, you don't need to implement an RPC protocol in bash, nor do you need FFI. You can use CLI tools like `dbus-send`.
I pray to God nothing meaningful is actually doing what you are insinuating in any serious environment.
Re:Varlink – IPC to replace D-Bus gradually in systemd
by otabdeveloper4 on Wednesday October 02, 2024 @04:10AM
(#41718312)
I'm trying to tell you that something that isn't straceable and greappable shouldn't belong in your system services stack.
- Whatever: people in more niche languages are pretty used to needing to do FFI for things like this anyhow.
- Many of them already have a better ecosystem than D-Bus. e.g. interoperability between Protobuf and Cap'n'proto implementations is good. Protobuf in most (all?) runtimes supports dynamically reading a schema and parsing binary wire format with it, as well as code generation. You can also maintain backwards compatibility in these formats by following relatively simple rules that can be statically-enforced.
- JSON and JSON-but-binary have some annoying downsides. I really don't think field names of composite types belong as part of the ABI. JSON-like formats also often have to try to deal with the fact that JSON doesn't strictly define all semantics. Some of them differ from JSON is subtle ways, so supporting both JSON and sorta-JSON can lead to nasty side-effects.
Maybe most importantly, since we're not writing software that's speaking to web browsers, JSON isn't even particularly convenient to begin with. A lot of the software will be in C and Rust most likely. It helps a bit for scripting languages like Python, but I'm not convinced it's worth the downsides.