Inherited from v1.0.0

Modules

Bnlang ships with a batteries-included standard library — file I/O, HTTP server and client, templating, four database drivers, crypto, WebSockets, and more. Every module on this page is importable out of the box, no installation needed:

import "io"   as io;
import "web"  as web;
import "json" as json;

Every module also has a Bangla aliasimport "ফাইল", import "ওয়েব", import "জেসন" resolve to the same Module instances. See Bilingual aliases for the full mapping.

Core

ModulePurpose
sysProcess info — argv, env, cwd, exit.
ioFile I/O — sync, async, and streaming.
pathCross-platform path manipulation.
timersset / interval for deferred and repeated callbacks.
timeClocks, calendar conversion, ISO 8601.

Asynchronous

ModulePurpose
FutureBuilt-in async value + wait keyword. The primary way to compose async work.

Utilities

ModulePurpose
logLeveled logging.
dotenvParse .env files.
cliDeclarative CLI argument parsing.
uuidGenerate and validate UUIDs.

Data

ModulePurpose
jsonEncode and decode JSON.
csvParse and emit CSV.
regexRegular expression matching, replacement, splitting.

Crypto, math, compression

ModulePurpose
cryptoHashing, HMAC, base64/hex, secure random.
randomNon-cryptographic RNG.
mathTrig, logs, rounding, list aggregations.
zlibgzip / deflate compression.

Network (low level)

ModulePurpose
netTCP sockets.
dnsHostname resolution and reverse lookup.
tlsTLS-encrypted sockets.
urlURL parsing and query-string serialization.

HTTP / Web

ModulePurpose
webHTTP/HTTPS server framework with routing and middleware.
requestAxios-style HTTP client.
wsWebSocket server.
cookieParse and build cookies and Set-Cookie headers.
sessionSession middleware.
multipartmultipart/form-data encode/decode.
templateJinja-flavored template engine.

Database

ModulePurpose
sqliteEmbedded SQLite.
pgPostgreSQL client.
mysqlMySQL / MariaDB client.
mongoMongoDB client.

Process & test

ModulePurpose
execSpawn child processes.
testBuilt-in test framework.