ling-lang
↓ 0 downloadsLing - The Omniglot Systems Language
Keywords systems, polyglot, ai, crypto, game
lingfu install ling-langCode / Files (995)
crates/ling-kernel/Cargo.toml
[package]
name = "ling-kernel"
version = "2030.1.37"
edition = "2021"
license = "Apache-2.0 OR MIT"
description = "Minimal kernel runtime for Ling — no_std CPU intrinsics, VGA, serial, and boot support"
[lib]
crate-type = ["rlib"]
[features]
# Off by default: requesting a Multiboot2 linear framebuffer makes GRUB
# switch out of VGA text mode, which would blank the screen for every
# existing text-console kernel (vga.rs/term.rs only know how to draw into
# the legacy 0xB8000 text plane, not a linear framebuffer — confirmed by an
# actual QEMU screendump going solid black with this tag always on). Only a
# kernel target that has its own framebuffer-based renderer should enable
# this.
request_framebuffer = []
[dependencies]
# no_std, no-alloc core hashing only (no `std`/`rayon`/mmap) — used by
# lingfs for content-addressing. NOT the same as `ling-crypto`'s Blake3
# wrapper, which assumes a heap/OS and can't be used directly in-kernel.
# `pure`: disable all SIMD-via-C-shim paths (aarch64's NEON acceleration
# needs a `cc` cross-compiler that doesn't exist for this bare-metal
# target — confirmed by an actual failed RPi build). Slower, portably
# correct on every architecture instead.
ling-osdaw = { path = "../ling-osdaw", version = "2030.0.2" }
# Pure-Rust no_std maths (sin/cos/pow/log10/exp/floor…) for the Ling value
# runtime (`lingrt`) — compiled `.ling` code calls these through the AOT ABI.
libm = "0.2"
# TrueType/OpenType rasteriser (no_std + alloc) for the app runtime's px_text:
# draws compiled apps' own fonts (embedded via [includes]) with host metrics.
fontdue = { version = "0.9", default-features = false, features = ["hashbrown"] }
# project.json for the in-kernel DAW engine (lingdaw): the same serde types as
# ling-daw's project.rs, no_std + alloc.
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
blake3 = { version = "1.5", default-features = false, features = ["pure"] }
# Ed25519 signature *verification* only (no `alloc`, no `rand_core`/`std`,
# no `precomputed-tables`/`fast` — those need alloc for their lookup
# tables): confirmed by an actual `build-std=core,compiler_builtins` probe
# build that this default-features-off set needs neither `alloc` nor a
# global allocator. Signing/keygen aren't exposed yet because they need a
# real CSPRNG, which this kernel doesn't have (`users.rs` currently seeds
# its salt from `rdtsc()`, explicitly flagged there as not good enough for
# secret key material) — see `ed25519.rs`. Must be built with
# `--cfg curve25519_dalek_backend="serial"` (see the kernel build's
# rustflags in `src/main.rs`): the default backend on x86_64 emits AVX2
# SIMD codegen that a freestanding `x86_64-unknown-none` target can't
# lower (confirmed by an actual `rustc-LLVM ERROR: Do not know how to
# split the result of this operator!` build failure without it).
ed25519-dalek = { version = "2.2", default-features = false }
# ── TLS 1.3 crypto suite (no_std, no getrandom) ──────────────────────────────
# The primitives an HTTPS client needs, built freestanding: entropy comes from
# RDRAND (arch::cpu::rdrand64), NOT getrandom, and X25519 secrets are built
# from raw bytes (the `static_secrets` API), so nothing here pulls in
# `getrandom`/`std`. x25519-dalek rides the same curve25519_dalek_backend=
# "serial" cfg the kernel already sets for ed25519. ChaCha20-Poly1305 (not
# AES-GCM) because it's pure software -- no AES-NI dependency.
sha2 = { version = "0.10", default-features = false }
hmac = { version = "0.12", default-features = false }
# WPA2 4-way handshake in the kernel (arch/aarch64/wpa.rs): PBKDF2/PRF/MIC are
# HMAC-SHA1, the group key arrives AES-key-wrapped.
sha1 = { version = "0.10", default-features = false }
aes = { version = "0.8", default-features = false }
# Account passwords: Argon2id (fs/users.rs), pure Rust, no_std + alloc.
argon2 = { version = "0.5", default-features = false, features = ["alloc"] }
hkdf = { version = "0.12", default-features = false }
chacha20poly1305 = { version = "0.10", default-features = false }
# Raw ChaCha20 (legacy 64-bit-nonce variant) + Poly1305 for the SSH server's
# `chacha20-poly1305@openssh.com` cipher, whose two-key/separately-encrypted-
# length construction the RFC-8439 AEAD above can't express. Both are already
# in the tree as `chacha20poly1305`'s own deps, so this adds no new crate risk;
# `legacy` exposes `ChaCha20Legacy` (8-byte nonce = the SSH sequence number).
chacha20 = { version = "0.9", default-features = false }
poly1305 = { version = "0.8", default-features = false }
x25519-dalek = { version = "2.0", default-features = false, features = ["static_secrets"] }
# PNG decode: DEFLATE/zlib inflate, no_std + alloc (no std, no C). PNG chunk
# parsing + scanline unfiltering are done in-tree (drivers/image.rs).
miniz_oxide = { version = "0.8", default-features = false, features = ["with-alloc"] }
# The browser's layout engine ("bring": browser-in-ling) -- its own
# package/repo (../../../bring-browser) so it host-tests with plain
# `cargo test` and stays reusable outside the kernel. no_std, zero deps,
# pure functions: HTML-subset in, styled wrapped lines + a link table
# out. The kernel side (drivers/browser.rs) only fetches, scrolls, draws.
bring-browser = { path = "../../../bring-browser", version = "0.1.0" }
# horizon: LingOS's second web engine, sibling to bring-browser -- a real
# DOM + CSS box-model layout with a <canvas> 2D surface, producing a pixel
# display list instead of wrapped text lines. no_std + alloc (a DOM tree
# and dynamic display list don't fit fixed buffers the way bring's do),
# zero third-party deps. The kernel side (drivers/horizon.rs) only
# fetches, scrolls, draws -- same division of labor as bring-browser.
horizon-browser = { path = "../../../horizon-browser", version = "0.1.0" }
# ling-messenger: P2P end-to-end-encrypted chat core -- identity, an
# authenticated handshake, and encrypted framing. no_std + alloc, real
# crypto (the same x25519-dalek/chacha20poly1305/ed25519-dalek/hkdf/sha2
# already vendored above for TLS). The kernel side (drivers/messenger.rs)
# does LAN discovery, UDP I/O, and the desktop UI -- see its own README
# for exactly what security properties the handshake does and doesn't
# provide.
ling-messenger = { path = "../../../ling-messenger", version = "0.1.0" }
# Qwen3 inference, freestanding (no_std + alloc + libm): the `ask` command and the model task in drivers/llm.rs. The weights live on a
# raw second IDE disk (see live/make-model-disk.py in LingOS), so the kernel image itself stays small.
ling-llm = { path = "../ling-llm", version = "2030.0.2" }
[profile.release]
lto = "fat"
codegen-units = 1
opt-level = 3
panic = "abort"