Skip to content
NorscodeNorscode

The standard library

Norscode has a deliberately large standard library. The goal is that ordinary tasks need no external dependency — every dependency you avoid is code you do not have to review.

Norscode has a deliberately large standard library. The goal is that ordinary tasks should not require a single external dependency — every dependency you avoid is code you do not have to review.

Modules are brought in with bruk:

bruk std.web som web
bruk std.json som json
bruk std.dato som dato

Web and networking

web · http · httpserver · url · ws · socket · tcp · dns · rest · graphql

All the way from a raw socket to a finished HTTP service with routes. The site you are reading now runs on web.

Data and storage

db · norsdb · sqlite · orm · pg · mysql · json · csv · xml

An own database (NorsDB), but also drivers for PostgreSQL and MySQL.

Cryptography and security

blake2b · sha256 · argon2id · chacha20_poly1305 · ed25519 · x509 · hmac · totp · tls13_handshake

A whole TLS 1.3 implementation, modern password hashing and two-factor. Not bindings against a C library — written in Norscode.

Text, time and files

tekst · regex · format · html · dato · tid · fil · path · zip · gzip

Collections, math and concurrency

liste · ordbok · sett · sortering · graf · math · bigint · desimal · asynk · tråd · pool

Arbitrary precision with bigint and exact decimal arithmetic with desimal — the latter is what you want for money, not floating point.

Below are the modules documented in detail. Each page shows the functions and short examples.