CalcKernel README

The project's README from github.com/luxine/CalcKernel. As one markdown file: README.md.

CalcKernel

Website · Get started · Documentation · Download · VS Code extension · Performance measurements · MIT license

CalcKernel (CK) is a statically typed language for numerical computation kernels: focused calculations that can be called from a larger application. Write a .ck source file and use ckc to check, run, or build it. CK can produce native programs and libraries, or emit C and WebAssembly for integration with existing systems.

CK is designed to handle the calculation while your application keeps responsibility for the surrounding work, such as user interfaces, input and output, and data storage. Its typed function interfaces and caller-owned data slices make that boundary explicit.

The latest stable release is 0.15.2, a WebAssembly performance and correctness update.

Why CalcKernel

Start using CK

  1. Download the compiler for your system.
  2. Follow the first-program tutorial to create and run a CK program.
  3. Use any text editor, or install the optional CalcKernel extension for Visual Studio Code.

The extension provides CK syntax support, live diagnostics, code navigation, and commands to check, run, and build the current file. See the VS Code guide for setup details.

Learn more

Performance depends on the algorithm, implementation, libraries, and target machine. The linked measurements describe specific workloads and are not a general ranking of languages.

Build from source

The default feature set builds and tests the frontend, C, and WebAssembly components without LLVM:

cargo test --locked
cargo build --release --locked

Native builds require the pinned static LLVM prefix specified in native/llvm/manifest.toml. The bootstrap script checks the source archive's SHA-256 before building it:

rustc_host="$(rustc -vV | sed -n 's/^host: //p')"
llvm_archive="$PWD/llvm-project-22.1.8.src.tar.xz"
curl -fL 'https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz' -o "$llvm_archive"
llvm_prefix="$PWD/build/llvm/prefix-$rustc_host-release"
./scripts/bootstrap-llvm.sh --archive "$llvm_archive" \
  --prefix "$llvm_prefix" --target "$rustc_host" --profile release
CKC_LLVM_PREFIX="$llvm_prefix" cargo build --release --features native-toolchain --locked

This prefix is needed to build CalcKernel's Native feature; release binaries do not require it at runtime. Windows MSVC build requirements are described in the getting-started guide.

Community

Contributions are welcome. Please read the contributing guide, security policy, and code of conduct.

License

CalcKernel is distributed under the MIT License.

CalcKernel (luxine/CalcKernel)

Searching Database…

What is this?CalcKernel (CK) is a statically typed language for writing focused numerical computation kernels that a larger application calls into, rather than a full application-level language.
Is CK a standalone app, a library, or a compiler toolchain?CK is a programming language with its own compiler (ckc). You write .ck source files, and ckc checks, runs, or builds them into native programs/libraries, or emits C or WebAssembly for embedding in other systems.
How do I write and run my first CK program?Download the prebuilt compiler for your system, then follow the first-program tutorial to create and run a CK program; any text editor works, with an optional VS Code extension for syntax help.
Do I need LLVM installed to use CK?Not for prebuilt releases. LLVM is only required if you build CalcKernel's Native feature from source, using a pinned static LLVM prefix verified by SHA-256 in the bootstrap script; release binaries don't need it at runtime.
How reliable are CalcKernel's performance claims?The README explicitly warns that its performance measurements cover specific workloads on specific machines and are not a general ranking against other languages, so results can vary by algorithm and target hardware.
Which platforms can I build and run CK programs on?You download a compiler build for your system and can target native machine code or WebAssembly; the docs separately cover Windows MSVC build requirements, alongside Linux and macOS support implied by the native/cross-platform build process.
What does the CalcKernel VS Code extension add?It provides CK syntax support, live diagnostics, code navigation, and commands to check, run, and build the current .ck file directly from the editor.
What is the simd128 profile used for?It's an opt-in WebAssembly profile that vectorizes supported array maps and integer reductions; unsupported cases automatically fall back to plain scalar code.
How does CK handle memory safety for the data it processes?Applications provide and retain ownership of all memory passed into CK via typed, caller-owned data slices, and native/C builds can optionally enable integer-overflow and slice-bounds checks.
Why use CK instead of just writing the numeric code in C?CK adds static typing and explicit, caller-owned data slices around the numeric boundary while still compiling to native code, a C-ABI library, or WebAssembly, giving stronger guarantees than hand-written C with similar integration options.
What are similar projects?scriptc, Tov, Singeli, raddebugger, spinel, perry, carbon-lang, goose
Creator
luxine
Size
3.9 MB
Stars
152
Age
20d
Commits · 90 Days