Skip to content

d2learn/xlings

Repository files navigation

Xlings | Highly abstract [ package manager ] - "Multi-version management + Everything can be a package"

Website | Quick Start | Package Index | XPackage | Contributing | Forum

Caution

xlings is currently migrating from Lua to MC++ with a modular architecture. Some packages may be unstable during this transition. If you run into any problems, please report them via Issues or the Forum.

Quick Start

Install (Github)

click to view xlings installation command (old)

Linux/MacOS

curl -fsSL https://d2learn.org/xlings-install.sh | bash

Windows - PowerShell

irm https://d2learn.org/xlings-install.ps1.txt | iex

tips: xlings -> details


Linux/MacOS

curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/refs/heads/main/tools/other/quick_install.sh | bash

Windows - PowerShell

irm https://raw.githubusercontent.com/d2learn/xlings/refs/heads/main/tools/other/quick_install.ps1 | iex

Useage

Type1: Install Software/Tools

xlings install code
xlings install devcpp
xlings install gcc@15

Type2: Config Environment

xlings install config:rust-crates-mirror
xlings install config:xxx

Type3: Install Tutorial - Interactive C++ Tutorial

xlings install d2x:mcpp-standard

👉 more details...

SubOS - Environment Isolation Mode

xlings supports creating isolated workspaces through the subos command.

Global isolated environment

Create an isolated environment and install Node.js into it.

# 0. Create a subos environment
xlings subos new my-subos

# 1. List all subos environments
xlings subos list

# 2. Switch to my-subos
xlings subos use my-subos

# 3. Install node inside the isolated environment
#    (without affecting the system / host environment / other subos)
xlings install node@24 -y
node --version

# 4. Remove the isolated environment
xlings subos remove my-subos

Project isolated environment

xlings also supports project-scoped isolated environments through a .xlings.json file, and can install the configured project environment with one command. Below is a real configuration from the d2x project:

{
  "workspace": {
    "xmake": "3.0.7",
    "gcc": { "linux": "15.1.0" },
    "openssl": { "linux": "3.1.5" },
    "llvm": { "macos": "20" }
  }
}

Install and configure the project environment with one command:

Run the following command in the project directory:

xlings install

Note: the SubOS mechanism uses a [ version view + reference counting ] strategy to avoid repeatedly downloading the same package payloads.

Community

  • Communication Group (Q): 167535744 / 1006282943
  • Community Forum: Discussions on related technologies, features, and issues

Contributing

Building xlings from source

The repo declares its own build dependencies (xmake / cmake / ninja and a platform-specific C++ toolchain) in .xlings.json, so you can install everything via xlings itself:

# 1. Install any recent xlings (one-liner) — see installation section above
# 2. From the repo root:
xlings install        # reads .xlings.json, installs xmake / cmake / ninja
                      # + musl-gcc on Linux / llvm on macOS
                      # (Windows uses the system MSVC)

# 3. Configure + build (paths exported by step 2 satisfy xmake's expectations):
xmake f -y
xmake build           # main binary
xmake build xlings_tests && xmake run xlings_tests

The same .xlings.json is consumed by GitHub Actions CI and the release pipeline, so a clean local build matches what CI runs.

👥Contributors

Star History Chart