Skip to main content

Getting started with the xPack Project

Challenge

First-time readers may find it difficult to understand the rationale behind the xPack Project. Therefore, presenting them with a challenge could be advantageous.

Imagine you have a highly successful project featuring a portable C/C++ library that you wish to have thoroughly tested before each release...

... You already have a comprehensive set of unit tests and you aim to execute them across a wide range of configurations, platforms, and toolchains.

Thus, the challenge is to find a solution that allows to:

  • Perform the tests on Windows, macOS (x64/arm64), and GNU/Linux (x64/arm64).
  • Run the tests on native platforms (Windows, macOS, GNU/Linux) as well as on various bare-metal embedded platforms (such as Cortex-M0/M3/M7/A15/A76, RISC-V 32/64-bit).
  • Build the tests using multiple versions of GCC and Clang.
  • Execute the tests on the local development machine and in widely-used CI/CD environments like GitHub Actions.

Please participate in the poll and, if you have a solution, kindly describe it in The xPack challenge category.

Then you can compare your solution with the xPack approach to this challenge.

The tools in the xPack Project can automate various aspects of the development process, with testing being perhaps the most prominent.

If you wish to learn more about these features or if this challenge resonates with your testing experience, please continue reading.

Mission statement

Our Mission

Enable developers to efficiently manage dependencies and multi-configuration builds, in a reproducible way.

Based on a straightforward multi-version dependencies manager built on top of npm, the xPack Project aims to provide a suite of cross-platform tools. These tools are designed to manage, configure, build and test complex, modular, multi-target projects (encompassing multiple architecture, boards and toolchains), in a reproducible way, with a particular focus on C/C++ and bare-metal embedded projects.

Where does the name come from?

Initially, the x prefix used in most names came from eXtended. Therefore xPack, pronounced ɛks-pæk, were understood as a form of eXtended Packages. Similarly, xpm was seen as an extended npm, and xcdl as an extended CDL.

Later, the meaning of xPack was considered to be more accurately described as an xpm package.

From the programming language perspective, another way to explain the name would be Any Type Package. This suggests that, unlike npm packages (which are essentially JavaScript packages), xPacks are more general and not restricted to a specific programming language.

Features

By design, the xPack Framework aims to automate:

  • managing dependencies
  • managing build configurations
  • the component configurations process
  • the build process
tip

Dependencies & build configurations are managed by xpm, while the configuration & build processes are handled by xcdl.

Benefits

  1. Enhanced Efficiency and Productivity: By providing a suite of cross-platform tools, the project streamlines the management, configuration, building, and testing processes, saving time and reducing the complexity involved in handling multi-target projects.
  2. Reproducibility: Ensuring that builds and tests can be executed repeatedly with identical results across different platforms and over time enhances the reliability and stability of the development process.
  3. Modularity and Flexibility: The focus on complex, modular projects allows for better organization and scalability. Developers can work on individual components without affecting the entire system, facilitating easier maintenance and updates.
  4. Cross-Platform Compatibility: Tools designed to work across various architectures, boards, and toolchains ensure that the project can be adapted to different environments, making it versatile and adaptable to various development needs.
  5. Specialization in C/C++ and Bare-Metal Embedded Projects: By targeting specific areas like C/C++ and bare-metal embedded projects, the tools can offer specialized features and optimizations that cater to the unique requirements of these domains.
  6. Improved Code Sharing and Reuse: The use of a multi-version dependencies manager built on top of npm promotes better code sharing and reuse, enhancing collaboration and reducing duplication of effort throughout the project lifecycle.
Benefits

These benefits collectively contribute to a more efficient, reliable, and adaptable development process, ultimately leading to higher quality software and faster time-to-market.

Install

Prerequisites

The only prerequisite for installing the xPack tools is an up-to-date version of Node.js. Detailed instructions for each supported platform are available on the dedicated Prerequisites page.

Core Tools

The xPack Core Tools can be installed automatically, using the npm command. Detailed instructions for each tool are provided in the separate xpm Install Guide and xcdl Install Guide pages.

Binary Tools

The xPack Binary Development Tools can be installed automatically, using the xpm command (the recommended method), or manually by downloading and unpacking one of the platform specific archives.

Please refer to the Install Guide pages for each project.

Visual Studio Code

As for GUI-based IDEs, the xPack Project prioritises integration with Visual Studio Code.

The VS Code xPack C/C++ Managed Build extension already supports running xpm actions from the graphical interface:

xpack actions

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.

Thanks to Shields IO for the badges.

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.