From 8629e9e93257ce8ec923f473e1adc640058ab8bc Mon Sep 17 00:00:00 2001 From: Youg-Otricked Date: Sun, 19 Jul 2026 21:00:00 -0700 Subject: [PATCH 1/3] Add qcm installer --- qcm/README.md | 114 ++++++++++++++++++++++++++++++++++++++++ qcm/install.sh | 18 +++++++ qcm/releases.conf | 1 + quantumc/README.md | 115 +++++++++++++++++++++++++++++++++++++++++ quantumc/install.sh | 9 ++++ quantumc/releases.conf | 1 + 6 files changed, 258 insertions(+) create mode 100644 qcm/README.md create mode 100644 qcm/install.sh create mode 100644 qcm/releases.conf create mode 100644 quantumc/README.md create mode 100644 quantumc/install.sh create mode 100644 quantumc/releases.conf diff --git a/qcm/README.md b/qcm/README.md new file mode 100644 index 000000000..53d9c3e15 --- /dev/null +++ b/qcm/README.md @@ -0,0 +1,114 @@ +--- +title: qcm +homepage: https://youg-otricked.github.io/QuantumC +tagline: | + QuantumC - An explicit programming language for systems developers. +description: | + QCM is the official QuantumC toolchain. It installs, updates, and manages QuantumC compilers, packages, and projects. +--- + +QCM is the official command-line tool for QuantumC. + +Like `go` for Go, QCM installs and manages the QuantumC toolchain, packages, and projects. +- installing QuantumC versions +- switching compiler versions +- managing packages +- creating and building projects + +Install/Update qcm: + +```sh +webi qcm@stable +# OR +qcm upgrade +``` + +### Files +``` +~/.config/envman/PATH.env +~/.local/opt/qcm/ +~/.local/bin/qcm +~/.qcm/ +``` + + +### Cheat Sheet + +QCM has two groups of commands: + +- **Project commands** manage the current QuantumC project and its packages. +- **Tooling commands** manage installed QuantumC compiler versions and the local toolchain. + +Install the latest QuantumC compiler: +```sh +qcm tooling install latest +``` + +List installed compiler versions: +```sh +qcm tooling list +``` + +Switch compiler versions: +```sh +qcm tooling use x0.18.0 +``` + +Create a new QuantumC project: +```sh +mkdir hello +cd hello +qcm init +``` + +Build and run the current project: +```sh +qcm run build +``` + +### Core Ideals +QuantumC has 4 core ideals; +1. Your Memory, Your Problem - QuantumC lets you do anything (yes, anything), but also will let you segfault your segfault. +2. Forced Cleanliness - QuantumC syntax is designed to be explicit and clean. This sometimes trades away terseness, but makes a better DX. +3. No Hiding - QuantumC does not hide away features or pretend they are the standard library when they are intrinsic. +4. No Excessive Syntax - QuantumC does not have any repetitive ridiculous syntax - no capture lists on lambdas, no `fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { ... }` + +### Hello World +1. Install the latest version of the QuantumC compiler + ```sh + qcm tooling install latest + ``` +1. Make and enter your project + ```sh + mkdir -p ./hello && cd hello + ``` +2. Create your `scope.yaml` & `main.qc` file + ```sh + qcm init # the rest of setup will be done in the wizard + ``` +3. Edit `main.qc` + + ```sh + cat << EOF > ./main.qc + int main() { + qout("Hello, World!"); + return 0; + } + EOF + ``` + +4. Build and run your `./hello` + ```sh + qcm run build # default command in your scope.yaml, equivelant to qc main.qc -o + ./hello + ``` + You should see your output: + ```text + > Hello, World! + ``` + +## Learn More + +QuantumC documentation: + +https://youg-otricked.github.io/QuantumC diff --git a/qcm/install.sh b/qcm/install.sh new file mode 100644 index 000000000..888e750b4 --- /dev/null +++ b/qcm/install.sh @@ -0,0 +1,18 @@ +#!/bin/sh +set -e +set -u + +__init_qcm() { + WEBI_SINGLE=true + + pkg_get_current_version() { + qcm --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2 + } + pkg_post_install() { + webi_post_install + "$pkg_dst_cmd" setup --no-export + } +} + +__init_qcm + diff --git a/qcm/releases.conf b/qcm/releases.conf new file mode 100644 index 000000000..9ab7b37d3 --- /dev/null +++ b/qcm/releases.conf @@ -0,0 +1 @@ +github_releases = Youg-Otricked/quantum-c-version-manager diff --git a/quantumc/README.md b/quantumc/README.md new file mode 100644 index 000000000..16c732e2e --- /dev/null +++ b/quantumc/README.md @@ -0,0 +1,115 @@ +--- +title: QuantumC +homepage: https://youg-otricked.github.io/QuantumC +tagline: | + QuantumC - An explicit programming language for systems developers. +alias: qcm +description: | + QCM is the official QuantumC toolchain. It installs, updates, and manages QuantumC compilers, packages, and projects. +--- + +QCM is the official command-line tool for QuantumC. + +Like `go` for Go, QCM installs and manages the QuantumC toolchain, packages, and projects. +- installing QuantumC versions +- switching compiler versions +- managing packages +- creating and building projects + +Install/Update qcm: + +```sh +webi qcm@stable +# OR +qcm upgrade +``` + +### Files +``` +~/.config/envman/PATH.env +~/.local/opt/qcm/ +~/.local/bin/qcm +~/.qcm/ +``` + + +### Cheat Sheet + +QCM has two groups of commands: + +- **Project commands** manage the current QuantumC project and its packages. +- **Tooling commands** manage installed QuantumC compiler versions and the local toolchain. + +Install the latest QuantumC compiler: +```sh +qcm tooling install latest +``` + +List installed compiler versions: +```sh +qcm tooling list +``` + +Switch compiler versions: +```sh +qcm tooling use x0.18.0 +``` + +Create a new QuantumC project: +```sh +mkdir hello +cd hello +qcm init +``` + +Build and run the current project: +```sh +qcm run build +``` + +### Core Ideals +QuantumC has 4 core ideals; +1. Your Memory, Your Problem - QuantumC lets you do anything (yes, anything), but also will let you segfault your segfault. +2. Forced Cleanliness - QuantumC syntax is designed to be explicit and clean. This sometimes trades away terseness, but makes a better DX. +3. No Hiding - QuantumC does not hide away features or pretend they are the standard library when they are intrinsic. +4. No Excessive Syntax - QuantumC does not have any repetitive ridiculous syntax - no capture lists on lambdas, no `fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { ... }` + +### Hello World +1. Install the latest version of the QuantumC compiler + ```sh + qcm tooling install latest + ``` +1. Make and enter your project + ```sh + mkdir -p ./hello && cd hello + ``` +2. Create your `scope.yaml` & `main.qc` file + ```sh + qcm init # the rest of setup will be done in the wizard + ``` +3. Edit `main.qc` + + ```sh + cat << EOF > ./main.qc + int main() { + qout("Hello, World!"); + return 0; + } + EOF + ``` + +4. Build and run your `./hello` + ```sh + qcm run build # default command in your scope.yaml, equivelant to qc main.qc -o + ./hello + ``` + You should see your output: + ```text + > Hello, World! + ``` + +## Learn More + +QuantumC documentation: + +https://youg-otricked.github.io/QuantumC diff --git a/quantumc/install.sh b/quantumc/install.sh new file mode 100644 index 000000000..ca0cd4903 --- /dev/null +++ b/quantumc/install.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -e +set -u +__redirect_alias_quantumc() { + echo "'QuantumC@${WEBI_TAG:-stable}' is an alias for 'qcm@${WEBI_VERSION-}'" + WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"} + curl -fsSL "$WEBI_HOST/qcm@${WEBI_VERSION-}" | sh +} +__redirect_alias_quantumc diff --git a/quantumc/releases.conf b/quantumc/releases.conf new file mode 100644 index 000000000..8dc169a7b --- /dev/null +++ b/quantumc/releases.conf @@ -0,0 +1 @@ +alias_of = qcm From 27d3189d7ee90eead4f1850fb70aca8011962e2f Mon Sep 17 00:00:00 2001 From: Youg-Otricked Date: Sun, 19 Jul 2026 21:16:59 -0700 Subject: [PATCH 2/3] feat(qcm): added qcm package --- qcm/README.md | 36 ++++++++++++++++++++++++++---------- qcm/install.sh | 3 +-- quantumc/README.md | 36 ++++++++++++++++++++++++++---------- test/install.sh | 3 +++ 4 files changed, 56 insertions(+), 22 deletions(-) diff --git a/qcm/README.md b/qcm/README.md index 53d9c3e15..8c08af4da 100644 --- a/qcm/README.md +++ b/qcm/README.md @@ -9,7 +9,9 @@ description: | QCM is the official command-line tool for QuantumC. -Like `go` for Go, QCM installs and manages the QuantumC toolchain, packages, and projects. +Like `go` for Go, QCM installs and manages the QuantumC toolchain, packages, and +projects. + - installing QuantumC versions - switching compiler versions - managing packages @@ -24,6 +26,7 @@ qcm upgrade ``` ### Files + ``` ~/.config/envman/PATH.env ~/.local/opt/qcm/ @@ -31,30 +34,34 @@ qcm upgrade ~/.qcm/ ``` - ### Cheat Sheet QCM has two groups of commands: - **Project commands** manage the current QuantumC project and its packages. -- **Tooling commands** manage installed QuantumC compiler versions and the local toolchain. +- **Tooling commands** manage installed QuantumC compiler versions and the local + toolchain. Install the latest QuantumC compiler: + ```sh qcm tooling install latest ``` List installed compiler versions: + ```sh qcm tooling list ``` Switch compiler versions: + ```sh qcm tooling use x0.18.0 ``` Create a new QuantumC project: + ```sh mkdir hello cd hello @@ -62,18 +69,27 @@ qcm init ``` Build and run the current project: + ```sh qcm run build ``` ### Core Ideals + QuantumC has 4 core ideals; -1. Your Memory, Your Problem - QuantumC lets you do anything (yes, anything), but also will let you segfault your segfault. -2. Forced Cleanliness - QuantumC syntax is designed to be explicit and clean. This sometimes trades away terseness, but makes a better DX. -3. No Hiding - QuantumC does not hide away features or pretend they are the standard library when they are intrinsic. -4. No Excessive Syntax - QuantumC does not have any repetitive ridiculous syntax - no capture lists on lambdas, no `fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { ... }` + +1. Your Memory, Your Problem - QuantumC lets you do anything (yes, anything), + but also will let you segfault your segfault. +2. Forced Cleanliness - QuantumC syntax is designed to be explicit and clean. + This sometimes trades away terseness, but makes a better DX. +3. No Hiding - QuantumC does not hide away features or pretend they are the + standard library when they are intrinsic. +4. No Excessive Syntax - QuantumC does not have any repetitive ridiculous + syntax - no capture lists on lambdas, no + `fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { ... }` ### Hello World + 1. Install the latest version of the QuantumC compiler ```sh qcm tooling install latest @@ -82,11 +98,11 @@ QuantumC has 4 core ideals; ```sh mkdir -p ./hello && cd hello ``` -2. Create your `scope.yaml` & `main.qc` file +1. Create your `scope.yaml` & `main.qc` file ```sh qcm init # the rest of setup will be done in the wizard ``` -3. Edit `main.qc` +1. Edit `main.qc` ```sh cat << EOF > ./main.qc @@ -97,7 +113,7 @@ QuantumC has 4 core ideals; EOF ``` -4. Build and run your `./hello` +1. Build and run your `./hello` ```sh qcm run build # default command in your scope.yaml, equivelant to qc main.qc -o ./hello diff --git a/qcm/install.sh b/qcm/install.sh index 888e750b4..3edd55378 100644 --- a/qcm/install.sh +++ b/qcm/install.sh @@ -6,7 +6,7 @@ __init_qcm() { WEBI_SINGLE=true pkg_get_current_version() { - qcm --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2 + qcm --version 2> /dev/null | head -n 1 | cut -d ' ' -f 2 } pkg_post_install() { webi_post_install @@ -15,4 +15,3 @@ __init_qcm() { } __init_qcm - diff --git a/quantumc/README.md b/quantumc/README.md index 16c732e2e..ef52b06d8 100644 --- a/quantumc/README.md +++ b/quantumc/README.md @@ -10,7 +10,9 @@ description: | QCM is the official command-line tool for QuantumC. -Like `go` for Go, QCM installs and manages the QuantumC toolchain, packages, and projects. +Like `go` for Go, QCM installs and manages the QuantumC toolchain, packages, and +projects. + - installing QuantumC versions - switching compiler versions - managing packages @@ -25,6 +27,7 @@ qcm upgrade ``` ### Files + ``` ~/.config/envman/PATH.env ~/.local/opt/qcm/ @@ -32,30 +35,34 @@ qcm upgrade ~/.qcm/ ``` - ### Cheat Sheet QCM has two groups of commands: - **Project commands** manage the current QuantumC project and its packages. -- **Tooling commands** manage installed QuantumC compiler versions and the local toolchain. +- **Tooling commands** manage installed QuantumC compiler versions and the local + toolchain. Install the latest QuantumC compiler: + ```sh qcm tooling install latest ``` List installed compiler versions: + ```sh qcm tooling list ``` Switch compiler versions: + ```sh qcm tooling use x0.18.0 ``` Create a new QuantumC project: + ```sh mkdir hello cd hello @@ -63,18 +70,27 @@ qcm init ``` Build and run the current project: + ```sh qcm run build ``` ### Core Ideals + QuantumC has 4 core ideals; -1. Your Memory, Your Problem - QuantumC lets you do anything (yes, anything), but also will let you segfault your segfault. -2. Forced Cleanliness - QuantumC syntax is designed to be explicit and clean. This sometimes trades away terseness, but makes a better DX. -3. No Hiding - QuantumC does not hide away features or pretend they are the standard library when they are intrinsic. -4. No Excessive Syntax - QuantumC does not have any repetitive ridiculous syntax - no capture lists on lambdas, no `fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { ... }` + +1. Your Memory, Your Problem - QuantumC lets you do anything (yes, anything), + but also will let you segfault your segfault. +2. Forced Cleanliness - QuantumC syntax is designed to be explicit and clean. + This sometimes trades away terseness, but makes a better DX. +3. No Hiding - QuantumC does not hide away features or pretend they are the + standard library when they are intrinsic. +4. No Excessive Syntax - QuantumC does not have any repetitive ridiculous + syntax - no capture lists on lambdas, no + `fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { ... }` ### Hello World + 1. Install the latest version of the QuantumC compiler ```sh qcm tooling install latest @@ -83,11 +99,11 @@ QuantumC has 4 core ideals; ```sh mkdir -p ./hello && cd hello ``` -2. Create your `scope.yaml` & `main.qc` file +1. Create your `scope.yaml` & `main.qc` file ```sh qcm init # the rest of setup will be done in the wizard ``` -3. Edit `main.qc` +1. Edit `main.qc` ```sh cat << EOF > ./main.qc @@ -98,7 +114,7 @@ QuantumC has 4 core ideals; EOF ``` -4. Build and run your `./hello` +1. Build and run your `./hello` ```sh qcm run build # default command in your scope.yaml, equivelant to qc main.qc -o ./hello diff --git a/test/install.sh b/test/install.sh index 4acfc3ec3..7cc7951d4 100644 --- a/test/install.sh +++ b/test/install.sh @@ -63,6 +63,7 @@ __rmrf_local() { prettier \ powershell \ pwsh \ + qcm \ rclone \ rg \ ripgrep \ @@ -160,6 +161,7 @@ __rmrf_local() { prettier \ powershell \ pwsh \ + qcm \ rclone \ rg \ ripgrep \ @@ -262,6 +264,7 @@ __test() { powershell \ prettier \ pwsh \ + qcm \ rclone \ rg \ ripgrep \ From 52ca342cec58d90d5515a6f67c11a863157734fd Mon Sep 17 00:00:00 2001 From: Youg-Otricked Date: Mon, 20 Jul 2026 21:12:47 -0700 Subject: [PATCH 3/3] edit(qcm): Changed readme to reflect new changes --- qcm/README.md | 2 +- quantumc/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qcm/README.md b/qcm/README.md index 8c08af4da..20eece3b5 100644 --- a/qcm/README.md +++ b/qcm/README.md @@ -107,7 +107,7 @@ QuantumC has 4 core ideals; ```sh cat << EOF > ./main.qc int main() { - qout("Hello, World!"); + `qout("Hello, World!"); return 0; } EOF diff --git a/quantumc/README.md b/quantumc/README.md index ef52b06d8..04e3ae662 100644 --- a/quantumc/README.md +++ b/quantumc/README.md @@ -108,7 +108,7 @@ QuantumC has 4 core ideals; ```sh cat << EOF > ./main.qc int main() { - qout("Hello, World!"); + `qout("Hello, World!"); return 0; } EOF