!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

434 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.142 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
20 Mar 2026
@emilazy:matrix.orgemilythe Rust frames will look just like C++ ones as far as Boehm is concerned12:24:21
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I mean if it just lives on the stack/registers/TLS it would just work, yes.12:24:43
@piegames:flausch.socialpiegames Though still, manual rooting would be a "solution" for the rooting problem in Rust GC. Admittedly an unsafe one, but still an improvement over anything C++ 12:25:34
@emilazy:matrix.orgemily(that said the perf tradeoffs between sufficiently good refcounting and sufficiently good GC aren't necessarily obvious, though Nix has little use for latency over throughput and lacks complex finalizers so likely to tilt in the GC direction. OTOH memory usage is famously bad so eager collection might not be the worst thing...)12:25:49
@emilazy:matrix.orgemilywhat do you mean by perf cost due to FFI linking?12:26:17
@emilazy:matrix.orgemilymanual rooting without an API that enforces it is vastly less safe than Boehm in C++ tbh12:26:59
@emilazy:matrix.orgemilywouldn't recommend that under any circumstances. would be better to just punt on rooting by trampolining and only collecting when there are no active Rust frames than that (IIRC one of the major GC crates works this way, I forget which one)12:28:31
@piegames:flausch.socialpiegamesmostly lack of inlining, AFAICT, possibly also some ABI shenanigans w.r.t. which values have to go on the stack12:30:47
@piegames:flausch.socialpiegamesas in, linking objects written in two different languages presents an optimization boundary which prevents LTO12:31:19
@emilazy:matrix.orgemilycross-language LTO will get you inlining12:31:22
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Can’t you compile the C++ part to llvm it with C ABI and link that with the rust shim?12:33:07
@emilazy:matrix.orgemily(and it's unlikely you can even measure ABi differences esp. since the less optimal case you is just what C++ uses for all code)12:33:18
@emilazy:matrix.orgemilycxx binds directly to the Rust12:33:32
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @xokdvium:matrix.org
Can’t you compile the C++ part to llvm it with C ABI and link that with the rust shim?
(That’s also compiled down to llvm-ir)
12:33:32
@emilazy:matrix.orgemilybut yes you can LTO between the two languages12:33:40

Show newer messages


Back to Room ListRoom Version: 10