Repository navigation
slang v0.2.4
Process, file watching, standard library, HTTP/2 and runtime updates since v0.2.3:
- Processes:
proc.spawnstarts a child without a shell (optionally in its own process group withproc.SPAWN_GROUP, or with stdin on /dev/null withproc.SPAWN_NULL_STDIN); an empty environment list inherits the parent's.proc.waitwaits for it with a deadline, parking the task on a pidfd (Linux) or kqueue (macOS) instead of blocking a worker, andproc.killsignals a child or its whole group. - File watching:
os.watch,os.watch_nextandos.watch_closereport batches of changed paths under a directory tree, with exclusions, through inotify (Linux) or FSEvents (macOS).os.mtime_nsgives nanosecond modification times. - Standard library:
sort: in-place sorting and binary search.crypto: Argon2id runs on dedicated KDF threads, andrsa_verify_sha256.
- HTTP/2: a multiplexed client, and responses with trailers. The client closes its transport only after its reader stops.
- Code generation: every opt and result is held by value; the current task is resolved once per function; loops with a numeric
+stay on the leaf path. Loop GC roots stay current across iterations, and achan_recvfill after a promoting wait is barriered. - Scheduler: idle workers spin and poll the network while spinning, and the parked-task registry is sharded off the GC lock.
- Networking: reactor waiters are woken only through their own registration, and
httpcapplies the request deadline to connecting. - Build: gcc's LTO pass no longer warns on every program built.
Install
From a tarball (relocatable: unpack anywhere and run in place). Pick
the one for your platform below; each was unpacked outside the source tree
and used to build and run a new project before this release was published.
tar -xzf slang-0.2.4-darwin-arm64.tar.gz
./slang-0.2.4-darwin-arm64/bin/slangc --version # slangc 0.2.4From source:
git clone https://github.com/dolphlabs/slang && cd slang
git checkout v0.2.4
sudo make install # PREFIX=/usr/local, or ~/.local
slangc new hello && cd hello && slangc main.sl --runUpgrading a source install: run sudo make uninstall from the old
checkout first. make install overwrites the binary but never deletes
stale runtime files.
Requirements
slangc compiles to C, so every platform needs a C compiler (cc).
| you import | you need |
|---|---|
| anything | a C compiler |
net with TLS, crypto, httpc over https |
OpenSSL (macOS: brew install openssl; Debian/Ubuntu: apt install libssl-dev) |
sql |
SQLite (Debian/Ubuntu: apt install libsqlite3-dev; ships with macOS) |
compress, httpc |
zlib (Debian/Ubuntu: apt install zlib1g-dev; ships with macOS) |
The Linux tarballs are built on Ubuntu 24.04 and need glibc 2.39 or later;
on an older distribution, build from source.
SHA-256
e348e1d957bae6bc9d01dd7e7a7b719328f7b76c31b547fed1a6464b641337c9 slang-0.2.4-darwin-arm64.tar.gz
405cd4899f75549fc7536ba4e54089e72a78f72735bf10d7b7ec63244ed480fe slang-0.2.4-darwin-x86_64.tar.gz
7e4189bd223c915dfc792436355cc5a50b1dc98c08fb00b2f39566d446cd300b slang-0.2.4-linux-aarch64.tar.gz
7de17b03e16db023a5ef03319136a7b6a5e4899d0b668e1233925635655071f1 slang-0.2.4-linux-x86_64.tar.gz