Skip to main content

distrib_common/
package_manager.rs

1// This is free and unencumbered software released into the public domain.
2
3use alloc::string::String;
4use derive_more::{Display, FromStr};
5
6/// A supported package manager.
7#[derive(Clone, Debug, Display, Eq, FromStr, Hash, Ord, PartialEq, PartialOrd)]
8#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
9#[non_exhaustive]
10pub enum PackageManager {
11    /// The Alire package manager for Ada.
12    ///
13    /// See: <https://alire.ada.dev/>
14    #[cfg(feature = "unstable")]
15    Alire,
16
17    /// The Cabal package manager for Haskell.
18    ///
19    /// See: <https://haskell.org/cabal/>
20    #[cfg(feature = "unstable")]
21    Cabal,
22
23    /// The Crates.io package manager for Rust.
24    ///
25    /// See: <https://crates.io/>
26    Cargo,
27
28    /// The Composer package manager for PHP.
29    ///
30    /// See: <https://getcomposer.org/>
31    #[cfg(feature = "unstable")]
32    Composer,
33
34    /// The Conan package manager for C/C++.
35    ///
36    /// See: <https://conan.io/>
37    #[cfg(feature = "unstable")]
38    Conan,
39
40    /// The CPAN package manager for Perl.
41    ///
42    /// See: <https://cpan.org/>
43    #[cfg(feature = "unstable")]
44    Cpan,
45
46    /// The Gleam package manager.
47    ///
48    /// See: <https://gleam.run/>
49    Gleam,
50
51    /// The Gradle package manager for Java/JVM.
52    ///
53    /// See: <https://gradle.org/>
54    #[cfg(feature = "unstable")]
55    Gradle,
56
57    /// The JSR.io package manager for TypeScript and ECMAScript.
58    ///
59    /// See: <https://jsr.io/>
60    Jsr,
61
62    /// The Leiningen package manager for Clojure.
63    ///
64    /// See: <https://leiningen.org/>
65    #[cfg(feature = "unstable")]
66    Lein,
67
68    /// The LuaRocks.org package manager for Lua.
69    ///
70    /// See: <https://luarocks.org/>
71    #[cfg(feature = "unstable")]
72    LuaRocks,
73
74    /// The Lux package manager for Lua.
75    ///
76    /// See: <https://lux.lumen-labs.org/>
77    #[cfg(feature = "unstable")]
78    Lux,
79
80    /// The Maven package manager for Java/JVM.
81    ///
82    /// See: <https://maven.apache.org/>
83    #[cfg(feature = "unstable")]
84    Maven,
85
86    /// The Hex.pm package manager for Elixir, Erlang, and Gleam.
87    ///
88    /// See: <https://hex.pm/>
89    Mix,
90
91    /// The Nimble package manager for Nim.
92    ///
93    /// See: <https://nimble.directory/>
94    #[cfg(feature = "unstable")]
95    Nimble,
96
97    /// The NPM package manager for JavaScript and TypeScript.
98    ///
99    /// See: <https://npmjs.com/>
100    Npm,
101
102    /// The NuGet package manager for C#/.NET.
103    ///
104    /// See: <https://nuget.org/>
105    #[cfg(feature = "unstable")]
106    NuGet,
107
108    /// The Opam package manager for OCaml.
109    ///
110    /// See: <https://opam.ocaml.org/>
111    #[cfg(feature = "unstable")]
112    Opam,
113
114    /// The Pub.dev package manager for Dart.
115    ///
116    /// See: <https://pub.dev/>
117    Pub,
118
119    /// The PyPI.org package manager for Python.
120    ///
121    /// See: <https://pypi.org/>
122    PyPi,
123
124    /// The Raco package manager for Racket.
125    ///
126    /// See: <https://docs.racket-lang.org/raco/>
127    #[cfg(feature = "unstable")]
128    Raco,
129
130    /// The RubyGems.org package manager for Ruby.
131    ///
132    /// See: <https://rubygems.org/>
133    RubyGems,
134
135    /// The Shards package manager for Crystal.
136    ///
137    /// See: <https://crystal-lang.org/reference/shards/>
138    #[cfg(feature = "unstable")]
139    Shards,
140
141    /// The Swift Package Manager (SwiftPM) for Swift.
142    ///
143    /// See: <https://swift.org/package-manager/>
144    #[cfg(feature = "unstable")]
145    SwiftPm,
146
147    /// The vcpkg package manager for C/C++.
148    ///
149    /// See: <https://vcpkg.io/>
150    #[cfg(feature = "unstable")]
151    Vcpkg,
152}
153
154impl PackageManager {}