Earlier quoted context omitted.
And yet Rust ecosystem practically killed runtime library sharing, didn't it? With this mentality that every program is not a building block of larger system to be used by maintainers but a final product, and is statically linked with concrete dependency versions specified at development time. And then even multiple worker processes of same app can't share common code in memory like this lib, or ui toolkit, multimedi…
if I recall correctly Rust does not support any form of dynamic linking or library loading. Most of the community I’ve interacted with are big on either embedding a scripting engine or WASM. Lots of momentum on WASM based plugins for stuff. It’s a weakness for both Rust and Go if I recall correctly
Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
121–130 of 289 posts
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#122I like Brave but the only thing that keeps me from using it on mobile is the lack of extension. That's why Firefox is my daily driver on Android
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#123Is Brave actually a good browser now? Did they rewrite it or something? Last time I looked it was a janky JavaScript mess.
You might be thinking of Vivaldi. Brave is certainly buggy, but it's not written in Javascript.
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#124Earlier quoted context omitted.
if I recall correctly Rust does not support any form of dynamic linking or library loading. Most of the community I’ve interacted with are big on either embedding a scripting engine or WASM. Lots of momentum on WASM based plugins for stuff. It’s a weakness for both Rust and Go if I recall correctly
Go definitely supports dynamic libraries
It’s been some time since I looked into this so I wanted to be clear on what I meant. I’d be elated to be wrong though
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#125Well brave still uses 300MB per tab on linux and almost 700MB per tab on Windows. So they do have a long way in front of them.
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#126Earlier quoted context omitted.
And yet Rust ecosystem practically killed runtime library sharing, didn't it? With this mentality that every program is not a building block of larger system to be used by maintainers but a final product, and is statically linked with concrete dependency versions specified at development time. And then even multiple worker processes of same app can't share common code in memory like this lib, or ui toolkit, multimedi…
if I recall correctly Rust does not support any form of dynamic linking or library loading. Most of the community I’ve interacted with are big on either embedding a scripting engine or WASM. Lots of momentum on WASM based plugins for stuff. It’s a weakness for both Rust and Go if I recall correctly
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#127Earlier quoted context omitted.
Go definitely supports dynamic libraries
I don’t mean Dylibs like you find on macOS, I mean loading a binary lib from an arbitrary directory and being able to use it, without compiling it into the program. It’s been some time since I looked into this so I wanted to be clear on what I meant. I’d be elated to be wrong though
You do still need to write the interfacing code, but that's true for all languages.
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#128Brave's adblocking engine is a neat example of open source and the ease of sharing lbraries in Rust. It uses Servo crates (also used by Firefox) to parse CSS and evaluate selectors, and is then itself published as a crate on crates.io where it can be pulled in by others who may want to use it.
And yet Rust ecosystem practically killed runtime library sharing, didn't it? With this mentality that every program is not a building block of larger system to be used by maintainers but a final product, and is statically linked with concrete dependency versions specified at development time. And then even multiple worker processes of same app can't share common code in memory like this lib, or ui toolkit, multimedi…
People writing Rust generally prefer to stay within Rust though, because FFI gives up a lot of safety (normally) and is an optimization boundary (for most purposes). And those are two major reasons people choose Rust in the first place. So yeah, most code is just statically compiled in. It's easier to build (like in all languages) and is generally preferred unless there's a reason to make it dynamic.
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#129I am surprised there does not exist a community fork of Brave yet that strips out all of the commercial stuff (rewards, AI, own updates), making it suitable for inclusion in the repos of mainstream free/libre Linux distros.
You can hide bat with one click as soon as you install brave
Even Firefox, which is the best we have currently, surprises us a few times a year with questionable decisions. Still, it's what I recommend to people.
Re: Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
#130Earlier quoted context omitted.
I don’t mean Dylibs like you find on macOS, I mean loading a binary lib from an arbitrary directory and being able to use it, without compiling it into the program. It’s been some time since I looked into this so I wanted to be clear on what I meant. I’d be elated to be wrong though
Both handle that just fine. Go does this via cgo, and has for over a decade. You do still need to write the interfacing code, but that's true for all languages.