Cover image for ESOC Report: Implementing Pixi Extensions
Written on

ESOC Report: Implementing Pixi Extensions

Swastik Patel
Swastik Patel

Hey there! I'm Swastik. I completed a 3-month internship at prefix.dev under the ESoC'25 (European Summer of Code) program, and this blog is all about my internship experience. Let's get started without further ado!

Diving into Rust

This all started exactly a year ago when Turbopack was made the default bundler in Next.js 15, and I got my hands on it. I had been working with React a lot and made the switch to Next.js, following the trends. Turbopack was in beta for a long time, and I didn’t bother to try it out then, but it became stable in Next.js 15, and the performance boost it brought was instantly and clearly evident. Things like server startup, code updates, route compilation, and production builds improved by 1.5 times, if not 2x. So I was damn curious about the underlying tech and how such performance gains were achieved, and this was my introduction to Rust. Yes, Turbopack is Rust-based. And this was the point when I developed a keen interest in the language. Before this, I had just heard of the language and read that many systems and tools traditionally built in C++ were being rewritten in Rust..

I started following the rust-lang book along with some video tutorials. Initially, things were smooth until the borrow-checker and lifetimes appeared; it took me some time to get my head around them. Coming from a JavaScript background, this language required a different mental model. After completing the book, I solved some Rustlings and Exercism problems to gain some confidence. I began exploring some open-source Rust projects, either to gather ideas or contribute to them. And this was the time when my roommate introduced me to Pixi. I instantly loved the idea behind pixi, and started exploring more about it. This blog would be too long if I were to explain each of its features. I will link to a few talks at the end of the blog, which will be enough to give you the introduction to pixi. If you are a developer, researcher, data scientist, ML Engineer, or a student struggling with complex environment management and dependency issues, you really need to check this out.

Joining prefix.dev for ESOC

So, I started by joining the discord server and picked a “good first issue” to tackle. Setting up the project was a breeze. I won’t lie- I was pretty overwhelmed at the beginning by looking at such a huge Rust codebase. But the community was so nice and welcoming, I got a lot of help from the founder of the company himself and eventually got my first PR merged. Then I picked one more issue, and this is how I got started. I remained active in the community, and then the European Summer of Code happened, for the very first time, and luckily enough, Pixi was listed as a project under the hub - German Center for Open Source AI. I was in touch with Wolf (the founder of the company), who was very helpful from the beginning. I applied and got selected! This was a very big moment for me, as I knew I would get to be introduced to the team and would be working closely with them on pixi. The team was really welcoming and got a lot of help from them on almost everything, be it solving some issues, CI failures, etc. Nichita, a senior Rust backend engineer, was assigned as my mentor for this 3-month internship. He was very helpful right from the start, gave me the freedom to message him at any time of the day and not to hesitate to ask something. What could I have asked for more! Wonderful team, supporting mentor, and very cool founder.

My work on Pixi

Now, if I dive a little into the technical details, I started out by working on writing the deactivation() method in Rattler, which is the Rust library that Pixi uses under the hood. This was a complex one and took a decent chunk of effort and time. At the end, when we were “almost” done with the PR, some checks kept failing for Windows, and eventually Nichita and Bas had to sit down to resolve that. Then I worked on a very cool functionality, which was introducing pixi-extensions to the pixi ecosystem. The core functionality of pixi could be extended with an external subcommand, following the naming convention pixi-*, which allowed the community to build and share new functionalities on top of pixi, without modifying the core pixi codebase. This was implemented from scratch by me, and involved a lot of PRs for different things, like logic to find and execute the external pixi commands on the system’s $PATH, showing suggestions on typos, pixi –list for showing all commands, docs, etc, all aligning at last to make the functionality work! You can read more about it here. Then I worked on features like adding flags like –dry-run to pixi global update and showing package suggestions when a user tries to add or install a package through pixi add bla or pixi global install bla respectively, and makes a typo.

Still contributing!

It has been a month since my internship ended but I’m still contributing to the project whenever I can, someone may ask ‘why’- it’s just that the community and the team is so nice, after all these months, I have begun to understand the codebase too, I learnt a lot during these 3 months, be it Rust, packaging, Git, etc, got to work with a team of 10x engineers, and who would want to give this all up! It was an absolute honor to share my summer with such a team, and I would love to be involved in the community further.

The videos I liked:

The prefix team would like to thank Swastik for being an awesome open source contributor! Excellent work!