Package Manager (DPM)
DPM (Djazair Package Manager) is the official package manager for the Djazair language. It allows you to easily install third-party libraries, compile native C/C++ extensions, and manage project dependencies.
DPM is written entirely in Djazair and comes bundled with the standard distribution.
Basic Commands
DPM provides a simple command-line interface to interact with packages.
Initialization
To start a new project or package, use init. This creates a dpm.json file in your current directory.
dpm init
The generated dpm.json will look something like this:
{
"name": "my-project",
"version": "1.0.0",
"description": "",
"dependencies": {}
}
Installing Packages
To install a package, use the install command. DPM fetches packages from the official Djazair registry, GitHub repositories, or local ZIP files, and installs them globally into your Djazair libraries directory.
# Install from official extensions repository
dpm install sqlite
# Install from a specific GitHub repository
dpm install github:username/repo-name
Once installed, you can use the module in any of your scripts anywhere on your system:
use sqlite
let db = sqlite.open("test.db")
# ...
Building Native Extensions
Some extensions (like raylib, sqlite, or mysql) contain C/C++ source code that must be compiled into native dynamic libraries (.dll, .so, or .dylib) before they can be used.
dpm build sqlite
DPM automatically detects your platform and uses the available C compiler (GCC, Clang, or MSVC) to build the extension.
Updating & Removing Packages
To update a package to its latest version from its original source:
dpm update sqlite
To completely remove an installed package and its files:
dpm remove sqlite
Listing Installed Packages
To view all packages currently installed on your system:
dpm list
DPM Configuration
Keep your dpm.json committed to your version control system to track your dependencies.