!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.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
@emilazy:matrix.orgemilythe Rust toolchain has specific support for it12:34:00
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Well fat lto is basically just linking llvm ir modules together, right?12:34:06
@emilazy:matrix.orgemilyyeah12:34:13
@emilazy:matrix.orgemilybut you can do cross language thinlto too12:34:21
@emilazy:matrix.orgemilyhttps://doc.rust-lang.org/rustc/linker-plugin-lto.html12:35:14
@emilazy:matrix.orgemily (for clarity: cxx is a Rust crate. it just layers on top of native C FFI in Rust to bind to C++) 12:37:56
@emilazy:matrix.orgemily(incl interop with C++ smart pointers etc.)12:38:14
@emilazy:matrix.orgemily(also for clarity: not just because you can get it wrong although that would be sufficient by itself, but also because even if you get recording the actual roots right it's quite likely that what you're telling the compiler with the resulting API shape will allow it to make assumptions that can lead to UB crashes)12:42:49
@piegames:flausch.socialpiegamesI mean, envision this: A special wrapper type which handles the manual root declaration, together with a special constructor and a macro that ensure the only way to get such a value is pinned on the stack. I'm daydreaming here, but doesn't sound completely implausible12:46:33
@emilazy:matrix.orgemilydid you read the blog post? :)12:49:07
@emilazy:matrix.orgemilyyou can do safe rooting APIs. it's just hard12:49:23
@emilazy:matrix.orgemily(and some of the obvious designs are broken)12:49:43

Show newer messages


Back to Room ListRoom Version: 10