Skip to main content

license GitHub Repo stars

Getting Started with xpm

Separate User/Developer/Maintainer pages

To meet the specific needs of different audiences, this site features separate User Information, Developer Information and Maintainer Information pages. This way, each group can easily find the information and resources most relevant to them.

First, let's clarify what xpm is NOT

  • xpm is NOT a npm replacement
  • xpm is NOT just another package manager
  • xpm is NOT introducing a new package format

So, what is xpm?

xpm, short for xPack Project Manager, is a Node.js CommonJS module and a CLI application designed to automate builds, tests and manage C/C++ dependencies. It draws inspiration from npm.

note

Compatibility with legacy CommonJS is required until VS Code extensions will be updated to import ES6 modules.

The open source project is hosted on GitHub as xpack/xpm-js and is published on npmjs.com as xpm.

xPacks

xPacks (short for xpm packages) are general-purpose, language-neutral software packages. They have been successfully used for C/C++ projects.

What the heck are xPacks? Please, do not introduce another package format!

Based on the content, there are two types of packages:

  • packages with source libraries (source xPacks)
  • packages with executables, usually platform specific binary tools (binary xPacks)

Source xPacks are regular npm packages that include library source files, typically in C/C++, though there are no language restrictions.

Binary xPacks are also regular npm packages, but with minimal content, typically just the package.json file. Since these xPacks provide executables for multiple platforms, some of which are quite large, it is impractical to include all binaries within the npm package itself. Instead, the package.json file contains references to platform-specific binary archives (e.g., .tar.gz for Unix or .zip for Windows).

Simply put, xPacks can enhance and automate the installation process for source libraries and tools.

By design, xPacks support multiple versions, allowing packages to have various versions installed simultaneously. Each project or build configuration can maintain its own set of dependencies, ensuring that system upgrades do not affect existing projects.

Features

xpm complements npm by streamlining cross-platform builds and tests with its distinctive features:

  • Package Installation: Installs the same format of packages as npm, including those from Git repositories and the npm public repository (npmjs.com).
  • Version Locking: Locks specific versions of source and binary packages as project dependencies, installing them on demand.
  • Build Configurations: Manages multiple build configurations, such as debug/release builds or platform-specific tests.
  • Configuration Dependencies: Locks specific versions of packages as build configuration dependencies.
  • Command Actions: Defines multi-line command actions at the project or build configuration level.
  • Property Management: Manages properties with complex substitutions, using the LiquidJS engine.
  • Cross-Platform Support: Runs on Windows, macOS, and GNU/Linux.

Benefits

  • Being able to develop exactly the same project on Windows, macOS and GNU/Linux gives team members the flexibility to use their preferred platform.
  • Locking projects to specific versions of dependencies ensures reproducibility, providing stability over time and across different environments.
  • Defining dependencies at the build configuration level allows for testing across different architectures, such as native, Arm, and RISC-V.
  • Installing multiple versions of the same package simultaneously enables testing with various versions of the same toolchain.
  • Multi-line commands with parameters and substitutions offer a robust and portable scripting mechanism.
  • Installing packages directly from Git/GitHub simplifies the maintenance of some packages during development.

Install

xpm is a npm package available from the npmjs.com public registry and can be installed via npm.

tip

The easiest way to get the install command is from the website's homepage. Simply hover the mouse over the command, and a copy button will appear on the right side. Click it to copy the command.

For comprehensive installation instructions, please visit the Install Guide page.

Status

xpm is fully functional, but it is still under development; therefore, according to SemVer, the version is kept as 0.y.z.

Upon completion, releases will start from version 1.0.0, signifying the program's transition to production status.

caution

As xpm is still under development, it is recommended to use it with caution.

Compatibility notices

According to SemVer rules:

Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API.

v0.0.0

All v0.*.* were development versions, with features gradually added.

v0.14.0

The xpm dependencies were separated from npm dependencies and policy 0001 was introduced.

v0.20.0

The list of executable applications in binary xPacks was moved from xpack.bin to xpacks.executables.

License

The original content is released under the MIT License, with all rights reserved to Liviu Ionescu.

MacStadium

Credits

Special thanks to MacStadium, for providing the Apple Silicon development infrastructure as part of their generous Free and Open Source Software program.

Enjoyed using this project? Let us know!

If you enjoyed using this project, please let us know! Here are some ways you can show your support:

  • Donate: Your contributions, whether small or generous, help us keep the xPack projects thriving. Donate
  • Star the project on GitHub: It helps others discover our work.
  • Follow us on X/Twitter: Stay updated with our latest releases and news.