News for hackers. Stuff that matters.
Re:Brave overhauled its Rust adblock engine with FlatBuffers... by speed_spread on Tuesday January 06, 2026 @09:28AM (#46512689)
Loading dynamic libraries can fail for many reasons but once loaded and validated it should be no more unsafe than regular crates?
Re:Brave overhauled its Rust adblock engine with FlatBuffers... by remexre on Tuesday January 06, 2026 @10:07AM (#46513196)
What properties are you validating? ld.so/libdl don't give you a ton more than "these symbols were present/absent."
Re:Brave overhauled its Rust adblock engine with FlatBuffers... by VorpalWay on Tuesday January 06, 2026 @12:40PM (#46515588)
You could check that mangled symbols match, and have static tables with hashes of structs/enums to make sure layouts match. That should cover low level ABI (though you would still have to trust the compiler that generated the mangling and tables).

A significantly more thorny issue is to make sure any types with generics match, e.g. if I declare a struct with some generic and some concrete functions, and this struct also has private fields/methods, those private details (that are currently irrelevant for semver) would affect the ABI stability. And the tables mentioned in the previous paragraph might not be enough to ensure compatibility: a behaviour change could break how the data is interpreted.

So at minimum this would redefine what is a semver compatible change to be much more restricted, and it would be harder to have automated checks (like cargo-semverchecks performs). As a rust developer I would not want this.