My personal blog, where I write about software development and the projects I’m working on.
– Mario Ortiz Manero

Plugins in Rust: Getting our Hands Dirty

Plugins in Rust: Getting our Hands Dirty

Welcome to one of the last articles of this series! Previously, we covered how to use external dependencies to lessen the work necessary to implement our plugin system. Now that we know how to actually get started, we’ll implement it once and for all. I will personally use the crate abi_stable , but the concepts should be roughly the same for any dynamic loading method. Similarly, some of my advice is related to modifying an already existing project of large size....

February 11, 2022 · 29 min · Mario Ortiz Manero
Plugins in Rust: Reducing the Pain with Dependencies

Plugins in Rust: Reducing the Pain with Dependencies

The last article of this series covered how the plugin system could be implemented from scratch. This is a lot of work if you’re dealing with a relatively large codebase and therefore a complex interface in your plugin system, so let’s see how we can make our lives easier. I’ve been wanting to try abi_stable for this since the beginning, which was specifically created for plugins. But we aren’t really locked to that crate, so I’ll show other alternatives as well, which can even be combined to your liking....

November 8, 2021 · 28 min · Mario Ortiz Manero
Designing an API Client in Rust: New Rspotify Version a Year Later

Designing an API Client in Rust: New Rspotify Version a Year Later

This article describes my journey of basically rewriting the entirety of Rspotify; around 13 months of work (in my free time), starting at September 2020, up until October 2021. I think this has given me enough experience for an article regarding API design on Rust, and perhaps those who attempt the same in the future can take some ideas and save time. Specially considering how much I’ve gone in circles and how much time I’ve “wasted” implementing things that ended up being discarded....

October 13, 2021 · 26 min · Mario Ortiz Manero
Plugins in Rust: Diving into Dynamic Loading

Plugins in Rust: Diving into Dynamic Loading

In the last part of this series I wrote some simple experiments of plugins both with WebAssembly and dynamic loading. After discarding Wasm for this specific PDK, I wanted to try to get a more realistic example with dynamic loading and work towards the final implementation. Since the Tremor team suggested that I began by implementing connectors, we’ll first have to learn more about them. Matthias ran me through their current state in a meeting, which I’ll try to summarize....

October 5, 2021 · 27 min · Mario Ortiz Manero
Plugins in Rust: Getting Started

Plugins in Rust: Getting Started

Welcome to my second article about Plugins in Rust! Here I will try to actually write some simple code of what a PDK (Plugin Development Kit) might look like, and also do some research about questions that arise while doing so. Please note that this is a series of posts, so you might be interested in reading the previous ones for context. Some probably weren’t expecting me to continue the series, as in the last article I wrote that Google didn’t end up allocating a slot for my project (as this was initially going to be for the Google Summer of Code)....

September 5, 2021 · 20 min · Mario Ortiz Manero
Why you shouldn't obsess about Rust "features"

Why you shouldn't obsess about Rust "features"

Rust makes it very easy to express conditional compilation, specially thanks to its “features”. They’re well integrated into the language and are very easy to use. But one thing I’ve learned by maintaining Rspotify (a library for the Spotify API) is that one shouldn’t obsess over them. Conditional compilation should be used when it’s the only way to solve the problem, for a number of reasons I’ll explain in this article....

July 6, 2021 · 7 min · Mario Ortiz Manero
Plugins in Rust: The Technologies

Plugins in Rust: The Technologies

Welcome to the “Plugins in Rust” series! During the next months I’ll be involved in an LFX Mentorship with Tremor, for which I need to implement a Plugin System (a.k.a. Plugin Development Kit or PDK). The goal is to maximize modularity and reduce Rust’s wild compilation times. The implementation will end up being done with dynamic loading, but I will cover all the alternatives first to make sure it’s the best approach for my use-case....

May 17, 2021 · 23 min · Mario Ortiz Manero
GSoC Proposal: Implementing a Plugin Development Kit for Tremor

GSoC Proposal: Implementing a Plugin Development Kit for Tremor

Abstract This Google Summer of Code project consists on developing a universal interface for Tremor plugins[1], allowing said library to become more modular and reduce the core set of dependencies. This will achieve a considerably reduced core size for Tremor, meaning that the library will be faster to compile and have a smaller binary size. Most importantly, it will transform Tremor’s architecture to be completely modular, where plugins can be configured as needed and developed independently, in a language-agnostic way....

April 13, 2021 · 10 min · Mario Ortiz Manero
Optional parameters in Rust

Optional parameters in Rust

Optional or default parameters are a very interesting feature of some languages that Rust specifically doesn’t cover (and looks like it won’t anytime soon). Say your library has lots of endpoints like so: fn endpoint<T1, T2, T3, ...>(mandatory: T1, opt1: Option<T2>, opt2: Option<T3>, ...); In this case, when you call endpoint, you have to use endpoint(mandatory, None, None, ...), or endpoint(mandatory, Some(val1), Some(val2), ...), instead of the more intuitive endpoint(mandatory) or endpoint(mandatory, val1, val2)....

October 10, 2020 · 11 min · Mario Ortiz Manero