mamot.fr is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mamot.fr est un serveur Mastodon francophone, géré par La Quadrature du Net.

Server stats:

3.5K
active users

Following the introduction, here is the part 1 of my series of articles on how to build a crossplatform search engine from scratch, in .

This section will handle how we'll store the encrypted data on any platform.

Enjoy reading it, feel free to provide some feedback, here or directly on GitHub 😉

jdrouet.github.io/posts/202503

jdrouet · Building a search engine from scratch, in Rust: part 1Or how to write on disk efficiently in the browser or any other device.

@jdrouet good article, looking forward to more!

I've got a question regarding `Directory::files`: when iterating over the files, you're `await`ing them one at a time – doesn't that kind of defeat the whole purpose of async? Could one instead spawn a task for each file, and then `join` all the handles?
I think an even nicer implementation could be some kind of `directory.files().filter(Path::is_file).collect()`, but that would require `AsyncIterator`, which AFAIK Rust doesn't currently have

Jeremie

@pmmeurcatpics thanks for your feedback!

Spawning a task for each file would require importing a runtime, which I decided not to do. Here, we only use `futures_lite` which doesn't have this `join` macro.

Taking a step back, this function will almost never be used so even if we optimise this, it will not be visible. 😉