I began learning Mojo and noticed there wasn’t a native default package manager and i began dreaming one up after doing a bit of research:
What currently exists:
- PKM - Mojo’s unofficial community package manager
- Mod - Mojo Dependency Manager
- Poor persons package management in Mojo
What the community is discussing and requesting:
- What is mojo’s package manager
- Mojo Project Manifest Discussion
- Mojo Projet Manifest Proposal
- Auto patch 3rd party imports to mitigate dependency hell
- Rust import the same create different versions
- For the Mojo package manager, consider making prebuilt binaries work from the start
I would use the name Mojic and use a Mojic.toml and Mojic.lock similar to how Rust’s cargo does it.
[dependencies]
futures_01 = { package = "futures", version = "0.1.0", type = "src", repo = "https://github.com/rust-lang/futures-rs" }
futures_03 = { package = "futures", version = "0.3.0" }
I would also add in a type of wether to use src or mojopkg, defaults to mojopkg.
If we soley use mojopkg could the compiler deduplicate dependencies of the same version across dependent mojopkg’s? Either way we will still need compiling from source from local paths or git repos so it won’t matter.
Then comes mojic.org a mojopkg repository with: User auth, package publishing api, reference to the package’s git repo, etc.
Anyways it’s a fun dream. :)