Skip to content

Packaging

Programs in every programming language need a package manager, in order to manage external dependencies with versions and simplify compilation and structuring.

As such, the package managers usually have the following components:

  • The manager itself
  • One or more configuration files for defining the versions, and compilation recipes
  • Index for external dependencies
  • A prescribed folder structure to use

The following is a table of popular programming languages and their package managers:

LanguagePrimary Package Manager(s)Notes
JavaMaven, GradleMaven uses XML (pom.xml), Gradle uses Groovy/Kotlin (build.gradle). Both handle dependencies & builds.
Pythonpip, condapip is standard (PyPI); conda also manages environments and non-Python dependencies.
JavaScript / Node.jsnpm, yarn, pnpmnpm comes by default; yarn and pnpm improve speed and efficiency.
TypeScriptnpm, yarn, pnpmUses the same ecosystem as JavaScript.
C / C++vcpkg, Conanvcpkg (by Microsoft) and Conan are modern dependency managers.
RustCargoBuilt-in, handles packages ("crates") and builds.
Go (Golang)Go Modules (go mod)Built-in dependency management since Go 1.11+.
RubyRubyGems, BundlerRubyGems is the base; Bundler manages project dependencies.
PHPComposerStandard for PHP package/dependency management.
RCRAN, BioconductorCRAN is main repository; Bioconductor for bioinformatics packages.
PerlCPANLongstanding Perl package ecosystem.
.NET (C#, F#)NuGetOfficial package manager for .NET projects.
HaskellCabal, StackCabal is traditional; Stack provides reproducible builds.
ElixirHexStandard package manager for Elixir/Erlang ecosystem.
Erlangrebar3, Hexrebar3 is build tool; Hex for package distribution.
Scalasbt, Maven, Gradlesbt is most popular in Scala projects.
KotlinGradle, MavenGradle (Kotlin DSL) is the most common.
SwiftSwift Package Manager (SPM)Official tool for Swift package management.
Objective-CCocoaPods, CarthageUsed in iOS/macOS projects.
JuliaPkg.jlBuilt-in package manager.
OCamlopamThe de facto package manager for OCaml.
Dart / FlutterpubStandard dependency manager for Dart/Flutter apps.
LuaLuaRocksStandard Lua package manager.

Powered by VitePress