hpc 以源码形式随标准库一同发布;按下方步骤在几分钟内拿到原生编译器。无需运行时、无需虚拟机。hpc ships as source alongside the standard library — follow the steps below to get a native compiler in minutes. No runtime, no VM.
需要 LLVM SDK + MSVC cl.exe 工具链。Requires the LLVM SDK + MSVC cl.exe toolchain.
需要 LLVM + GCC/Clang 与开发头文件。Needs LLVM + GCC/Clang and dev headers.
通过 Homebrew 安装 LLVM,再用 CMake 构建。Install LLVM via Homebrew, then build with CMake.
hpc 与标准库。Clone the repo or grab the source tarball from Releases — it includes hpc and the standard library.config.txt 指向本机的 LLVM / MSVC 路径(参见编译器页)。Point config.txt at your local LLVM / MSVC paths (see the Compiler page).hpc,一句命令编译你的第一个 .hp。Use CMake to produce hpc, then compile your first .hp in one command.# 1) 克隆
git clone https://example.com/hp-lang/hpc.git
cd hpc
# 2) 配置工具链(Windows 示例)
# 编辑 config.txt:
# llvm sdk 地址: D:\clang+llvm-22.1.8-x86_64-pc-windows-msvc
# cl.exe 地址: D:\msvc\VC\Tools\MSVC\14.51.36231\bin\Hostx64\x64
# 3) 构建
cmake -B build -S .
cmake --build build --config Release
# 试试看
./build/hpc -O3 -o hello.exe examples/helloworld.hp
./hello.exe
直接看示例库,或跟着教程写出第一段 HP 程序。Jump straight to the examples, or follow the tutorial to write your first HP program.