Hello o/
I would like to develop a package manager in c# to expand my knowledge about the language and more understand how package managers put together entire system.
so here are my questions:
- where should I start?
- do I invent my own pkg format or do I use pre built packages like deb or rpm? I think the later one will be more easier
- how do I setup my dev environment I am on Ubuntu and has installed VS Code and dotnet sdk
sorry it these questions feel too naive but I really think I can do this!
Thanks in advance!
It might be better to first learn about existing package managers: build some packages for rpm, apt, pac…etc.
The fundamentals would be easier to understand from there to figure out what you actually want to write and why.
At their core, packages are simply just bundles of flat files, and stages of scripts that get executed. That’s it. Like a zip file with scripts.
Package Managers on the other hand are just clients that deal with the metadata and contents of packages and decide what to do with them. They go way deeper.
I think the most effective way would be for u to start learning source code of apt,rpm,pacman to understand what they are doing and this is for what we are loving free and open source software then start implementing small basic things.
I agree, but I’d got even lower level. Look at how slackware handles packages – it’s a much simpler implementation to learn from, as it doesn’t do dependency graphs. Get that working first, then look at how the other systems handle deps.
Write pnpm in faster and universal, like nix or guix
I’ll cover item 1: start by writing a document, describing what you want to achieve: what do you mean by package, what do you mean by package manager, what features you want to have, what features you do not want to have, how you’re going to build and distribute the packages.
The reason why this is important is that a) this will be a useful reference for the implementation, b) you will learn a lot about the subject matter by trying to answer these questions, and c) you’ll learn to write such documents which is a very useful skill.



