# Why kern exists

> Every major backend language was designed before GDPR, before LLMs, before container-native infrastructure. kern is the first designed after all of these.

Source: https://kern-lang.eu/why-kern

Every major backend language was designed before GDPR, before large language models, before container-native infrastructure, and before European digital sovereignty became a legal and economic priority.

They all require you to bolt these things on — as libraries, middleware, and external tools — in different languages, with different error models.

kern is the first backend language designed after all of these became requirements.

## All four. One language.

Go gives you performance. Python gives you readability. Node gives you async. TypeScript gives you types. Every team picks two or three and accepts the tradeoffs of the rest.

Readable like Python

```
fn process(users: List<User>) -> Result<Report>:
    active = users.filter(fn(u) -> u.active)
    return Ok(Report(count: active.length))
```

Type safe like TypeScript

```
name: str   = "Marie"   # can never be null
alias: str? = none      # explicitly nullable
```

Async like Node

```
task1 = spawn fetch_users()
task2 = spawn fetch_orders()
users  = await task1
orders = await task2
```

Fast like Go

```
kern build my-api.kern -o my-api
./my-api   # no runtime, no interpreter, no dependencies
```

## GDPR compliance is currently a library bolted on.

Every European company using Python, Go, or Node.js manages GDPR compliance manually. It fails constantly because nothing in the language itself prevents a developer from passing personal data to the wrong place.

In Python, this compiles, runs, and silently violates GDPR

```
def send_email(user):
    # personal data sent to analytics -- GDPR violation
    analytics.track(user.email)
    send(user.email, "Welcome!")
```

In kern, this is a compile error

```
fn send_email(user: User):
    analytics.track(user.email.value)
    # ERROR E0302: PersonalData<str> cannot reach a sink
    # that does not declare PersonalData
    # Hint: declare the parameter PersonalData, or redact first
```

The only way to use personal data in kern:

kern

```
from std.compliance import check_consent

fn send_email(user: User, consent: str):
    check_consent("process", consent)
    analytics.track_event("signup")   # event only, no PII
    send(user.email_plain, "Welcome to kern!")
```

## AI is now a backend requirement.

LLM calls with compile-time safety. Model output is Untrusted\<str> at the source, so prompt injection is a type error. European providers by default.

main.kern

```
from std.cap_ai import ai_root, ai_complete
from std.untrusted import untrusted_validate_length

fn main():
    ai = ai_root()          # only main mints it
    reply = ai_complete(ai, "mistral", "How do I deploy?")
    # reply is Untrusted<str>: validate before use
    answer = untrusted_validate_length(reply, 1, 4000)
    print(answer)
```

deploy.kern

```
import sys.container
import sys.compose

async fn deploy():
    app = compose.stack("production", [
        compose.Service(
            name:  "db",
            image: "postgres:16-alpine",
            env:   {"POSTGRES_DB": "myapp"},
            volumes: ["db-data:/var/lib/postgresql/data"]
        ),
        compose.Service(
            name:    "api",
            image:   "myapp:1.0",
            ports:   ["8080:8080"],
            depends: ["db"]
        )
    ])
    await app.up()?
    log.info("Production stack running")
```

## Container management belongs in the language.

The same language, the same error handling, the same type system — for your application code and your infrastructure code.

## Sovereignty has a stack.

Sovereign European silicon is real work, but it is a decade away. The language layer sits above the hardware and the OS. It is where data is shaped, encrypted and moved. Own the language and you own the security and privacy that reach the user, today, without waiting for anyone’s chip foundry.

1. Applications  
Your software, sovereign by construction
2. Language · kernWhere Europe starts  
Security, encryption, privacy enforced by the compiler
3. Operating system  
Bound to the hardware it runs on
4. Silicon & hardware  
A decade of work. Necessary, but not where we wait

Every component is EU-hosted, EU-governed and EUPL-licensed. No CLOUD Act. No FISA 702.

Source codeCodebergGermany

Package registrypkg.kern-lang.euFrance

CI/CDWoodpeckerGermany

Static hostingCodeberg PagesGermany

Default cloud LLMMistralFrance

Default vector DBQdrantGermany

Default local LLMOllamaOpen source

No GitHub. No npm. No AWS.  
No Cloudflare.

## Honest about what kern is and what it's not.

### kern is for

- European companies subject to GDPR who are tired of compliance being a manual, error-prone process
- Public sector organisations mandated to reduce US cloud dependency
- Developers who love Python's readability but need Go's performance
- Teams building AI-powered backends who want European providers and privacy by default
- Anyone who believes critical digital infrastructure should not be governed by a single American corporation

### kern is not for

- Data scientists who need NumPy and pandas — use Python
- Systems programmers building operating systems — use Rust
- Teams with ten years of Go investment — switching has a cost, stay with Go
- Projects that need Windows support — kern targets Linux (production) and macOS (development)

## Built in Europe. Built to last.

[Get started](https://kern-lang.eu/get-started) [How kern compares](https://kern-lang.eu/compare) 

`curl -fsSL https://kern-lang.eu/install.sh | sh`
