Repository navigation
Install
Linux and macOS:
curl -fsSL https://github.com/velt-lang/velt/releases/download/v0.5.0/get-velt.sh | shWindows (PowerShell):
irm https://github.com/velt-lang/velt/releases/download/v0.5.0/get-velt.ps1 | iexThen run velt doctor. The toolchain brings its own linker: no Visual Studio Build Tools,
Xcode or C compiler needed
(Platforms and installation).
What's Changed
- sema: overload callbacks with a rest parameter, conditional spreads, optional method calls, template-literal regex groups (#379) by @andtii in #1583
- sema, vir: a throw inside a proxy trap leaves the operation that ran it (stage 1 of #1174) by @andtii in #1474
- sema, std: ReadonlySet/ReadonlyMap, number-keyed records, globalThis with variable keys and declare global, Record<symbol, unknown> casts (#379) by @andtii in #1558
- syntax, sema: a script may declare its own main and call it, as in Node (#1567) by @andtii in #1604
- lsp: a std file opened in the editor is checked as its std module by @andtii in #1611
- sema, std: classes as plain values, x.constructor, Object.create/assign cases, call/bind and Error.stack for sigx by @andtii in #1585
- std: BTreeMap, an ordered map as a B+tree in pure Velt (#1543 step 1) by @andtii in #1545
- bench: check_all_std checks every std module; the bench job runs on a fixed image by @andtii in #1616
- sema: extend X implements I, retroactive implements with the most specific block per type (#1546) by @andtii in #1548
- opt: Math.min / Math.max without a rest array; module state looked up once per function call by @andtii in #1575
- opt: local number[] arrays of whole numbers stored as integers (#525 step 5) by @andtii in #1617
- std: BTreeMap on public APIs any package can use; faster than Rust std and bbtree on Apple M4, behind bbtree on x86 u64 delete (#1543 step 2) by @andtii in #1560
- sema, vir: generic interface methods called on interface values (#943) by @andtii in #1561
- sema: generic recursive union aliases, Awaited and uninitialized module lets for sigx (#379) by @andtii in #1626
- sema: narrowing of module-level lets, record keys and loop updates (#379) by @andtii in #1603
- sema, vir: getter literals as views, accessor writes through any, identity keys and symbol record reads for sigx (#379) by @andtii in #1628
- Array length limit: at most 2^52 - 1 elements, enforced, so
i <= xs.lengthcounts in integers by @andtii in #1581 - sema, vir: generic function values through tables of instantiations (#943) by @andtii in #1562
- sema: types and values share a name in separate namespaces, as in TypeScript, for sigx (#379) by @andtii in #1634
- vir, codegen: velt_atomic_* externs emitted inline by both backends (atomics step 1a) by @andtii in #1619
- goldens: timer_captures orders its timers by creation and delay, not by how fast the setup runs by @andtii in #1648
- sema, vir, std: Atomic, a word in place that threads change at once (atomics step 1b) by @andtii in #1620
- std: velt:sync (Backoff, VersionLatch) on Atomic, and bench/atomics against Rust (atomics step 1c) by @andtii in #1621
- sema: calls of prelude helpers throw what the helper throws, so sigx's signal() lowers (#379) by @andtii in #1652
- rt: spawned tasks that compute start at once on idle workers (atomics step 1d) by @andtii in #1623
- simd, std: T.loadOptimistic, a vector load of Atomic words for optimistic reads (atomics step 2a) by @andtii in #1639
- sema: closures before the const they use, and unknown narrowing, for sigx (#379) by @andtii in #1647
- sema, std: records hold symbol keys and defined accessors in tables of their own (#1629) by @andtii in #1643
- codegen, cli: x86_64 code is for x86-64-v2 by default; --cpu, VELT_CPU and build.cpu choose another CPU; a start-up check names a missing feature (#1613) by @andtii in #1614
- opt: read fields of frozen borrowed params once, also around atomics, fences and calls (atomics step 1e) by @andtii in #1624
- opt: frozen fields are read once also through pointers to them and when their address is taken (atomics step 2b) by @andtii in #1641
- opt: decide range checks an earlier check proves (bounds) (atomics step 2b) by @andtii in #1640
- std: ConcurrentMap, a u64 map many threads read and write at once (atomics step 2) by @andtii in #1644
- sema: static methods of primitive types,
f64.half(x)(#1679) by @andtii in #1684 - docs: CLAUDE.md lists the pitfalls agents hit by @andtii in #1698
- docs: CLAUDE.md: a shared target directory also reads the other worktree's std by @andtii in #1703
- docs: design notes for the JSON engine and for building strings fast by @andtii in #1691
- docs: concurrent_map's x86 numbers after the cheaper leaf split; rewrap two long lines by @andtii in #1705
- sema: rejecting promises stored into Promise written without an error type, for sigx (#379) by @andtii in #1650
- syntax, sema: abstract classes and abstract members (#1568) by @andtii in #1683
- std: String.fromCodePoint and string codePointAt (#1678) by @andtii in #1692
- opt: elide read-only string copies (clone/drop pairs) (#1670) by @andtii in #1693
- lang: f64 bit casts, x.toBits() and f64.fromBits(b) by @andtii in #1704
- lang: Atomic and Atomic, with add, sub, max and min as compare-and-swap loops by @andtii in #1712
- sema: getters in object literals and callback parameter types from the call, for sigx (#379) by @andtii in #1671
- rt, vir, sema: promises compare and hash by identity, through shares and conversions (#1682) by @andtii in #1687
- codegen: string byte loads carry the array element alias tag (#1669) by @andtii in #1694
- std: ConcurrentMap reuses emptied leaves, so keys moving to new ranges fit a fixed capacity (#1689) by @andtii in #1708
- lang: ThreadLocal, one value per thread, as the platform's thread-local storage (reclamation step 1, #1696) by @andtii in #1714
- vir: zero-sized members and promises through
any, for sigx SSR (#379) by @andtii in #1731 - docs: maintainer loop driven by events, resumed reviewers, what a review requires, queue triage by @andtii in #1730
- vir, codegen: static atomics, a module const made by
new Atomic<T>(literal)is a writable word with no module lock (reclamation step 2a, #1696) by @andtii in #1741 - docs: design note for compiling std's Velt code once, a cached std object (#1728) by @andtii in #1743
- bench: the JSON corpora (canada, citm_catalog, twitter) against serde_json, sonic-rs, simd-json and Node (part of #1657) by @andtii in #1746
- link: Windows executables get an 8 MiB main-thread stack, as on Linux, macOS and WebAssembly by @andtii in #1750
- vir: a receiver holding an Atomic is never copied to hold it against later arguments by @andtii in #1761
- rt: threads that run tasks get an 8 MiB stack, as the main thread has by @andtii in #1759
- lang: Atomic<shared> and Atomic<shared | null>, a word owning one counted reference (reclamation step 2b, #1696) by @andtii in #1742
- vir: Promise combinators over an array the program keeps, for sigx (#379) by @andtii in #1749
- opt: numrep's flow analysis linear in the size of a function (#1658) by @andtii in #1767
- lang: load() of an Atomic of a shared value is an uncounted borrow (reclamation step 2c, #1696) by @andtii in #1763
- sema: error types through recursion and adapted closures, for sigx (#379) by @andtii in #1753
- rt: the monitor rescues a stalled worker only when another worker can take its tasks (#1673) by @andtii in #1748
- std: velt:sync/epoch, epoch-based reclamation in Velt (reclamation step 2d, #1696) by @andtii in #1764
- sema: functions with properties in generic code and overloaded interface methods, for sigx (#379) by @andtii in #1751
- sqlite: read the SQLite file format in Velt: header, b-tree cursors, records, overflow chains (#1715) by @andtii in #1754
- sema: object-literal fields take rejecting promises and functions with defaulted extra parameters, for sigx (#379) by @andtii in #1768
- rt: regex surrogate ranges without the u flag, and Promise.race over settled promises in array order (#379) by @andtii in #1770
- lang: epoch sections placed by the compiler, and replaced references retired to velt:sync/epoch (reclamation step 2e, #1696) by @andtii in #1769
- lang: Atomic, a word pointing to a counted box holding the string (reclamation step 2f, #1696) by @andtii in #1771
- sema, vir, std: Reflect.set and generic keys on proxies, this in function expressions, for sigx (#379) by @andtii in #1700
- tests: the race cases of promise_combinators_kept_array wait 40 ms for the slow promise by @andtii in #1792
- sqlite: the statement parser in Velt: DDL with constraints, INSERT with UPSERT and RETURNING, UPDATE, DELETE, transactions, PRAGMA (#1720) by @andtii in #1756
- std: Atom in velt:sync, a shared value read without a lock and replaced whole (#1696 step 3) by @andtii in #1776
- ci: the merge queue checks macOS goldens in two shards by @andtii in #1799
- sqlite: the schema from sqlite_schema, and SQLite's value rules in Velt (#1720) by @andtii in #1757
- vir, opt: objects with counted pointer fields stay in registers, and a generator's frame is never noalias by @andtii in #1758
- vir: drop a typed proxy's answer for one key of
s[k]in that key's arm by @andtii in #1806 - tests: race goldens wait for the promises they compare instead of counting on timer order by @andtii in #1804
- sema, vir: class intersections, record fills and throwing defineProperty getters for sigx (#379) by @andtii in #1709
- vir: async spill analysis without blocks × locals dataflow (#1793) by @andtii in #1807
- vir: Linkage::Import, a function defined in another object of the link, in both backends (#1728 step 2a) by @andtii in #1821
- vir: panic texts name std files relative to the std root, the same on every machine (#1728 step 1) by @andtii in #1820
- velt test: one build for many test files, files in parallel, the runner in Velt (velt:test) by @andtii in #1818
- lang: Atomic over a type parameter bounded by AtomicValue (#1696 step 4.1) by @andtii in #1796
- lang: typeIs<A, B>() and asType(x), compile-time type tests for generic code (#1696 step 4.2) by @andtii in #1811
- tests: an imported module's output comes before the root's when the root starts a timer and a microtask (#1399) by @andtii in #1817
- velt test: after a failed shared build, only the files with errors alone; --filter with no match builds nothing by @andtii in #1832
- vir: function fingerprints move to velt_vir, with a link mode for the cached std object (#1728 step 2b) by @andtii in #1828
- syntax, sema, vir, std: system functions declared in any module, checked against the target's C library (#1716) by @andtii in #1797
- vir, rt, sema: properties on functions held as
any, andanyto object types, for sigx (#379) by @andtii in #1772 - velt_build_cache: a content-addressed store for compiled code shared by every build on a machine (#1612) by @andtii in #1823
- codegen: compiled code from the build cache, Cranelift on every core (#1612) by @andtii in #1824
- build: an unchanged build compiles nothing (#1612) by @andtii in #1825
- velt cache warm: compile std into the build cache when a toolchain is installed (#1612) by @andtii in #1826
- rt: a string from a byte range checks ASCII once; stdout is flushed before stdin waits by @andtii in #1846
- sema: check standard-library definitions on demand, when reached (#1658) by @andtii in #1802
- design: workspaces, monorepos of Velt packages by @andtii in #1856
- sema, vir:
anyto function types called throughany, andanywrites to views, for sigx (#379) by @andtii in #1841 - opt: a declared function is opaque to every pass (#1728) by @andtii in #1862
- vir: a Promise instantiation of a type parameter finds its extend block through a bound by @andtii in #1865
- lang: the Frozen bound, so generic code reads a shared as V (#1696 step 4.2b) by @andtii in #1816
- vir:
inthroughanyfor arrays, collections, functions and class instances, for sigx (#379) by @andtii in #1843 - syntax: an await inside a callback at the top level isn't top-level await by @andtii in #1870
- collections: ConcurrentMap<K, V>, values of any Frozen type (#1696 step 4.3) by @andtii in #1830
- vpm, veltc: workspaces step 1, velt.workspace.vlt members with one lock and per-member outputs by @andtii in #1867
- fetch: the HTTP client in Velt, gzip and Brotli in Velt (velt:compress), carry-less multiplication in velt:simd by @andtii in #1815
- velt:test: describe, it, the hooks and expect, as Vitest's; "vitest" imports velt:test by @andtii in #1869
- vpm: git dependencies, a package from a repository at a branch, tag or commit by @andtii in #1876
- json: Number/parseFloat, JSON.parse's scanner and reader in Velt, and JSON loaded on use (#1658, #1668) by @andtii in #1747
- text: a number whose ryu text is already JavaScript's is printed as it is, not parsed back into digits by @andtii in #1887
- sema, vir: a for…of binding keeps its element alive when the body replaces it by @andtii in #1868
- vir: an array passed to a runtime out-parameter is the array itself, also when its type is boxed for views by @andtii in #1883
- json: JSON.stringify writes through velt:json/writer in Velt, with inline literal appends and StringBuilder (#1668, #1677) by @andtii in #1765
- std tests: velt:http's behaviour tests on velt test, with describe/it/expect by @andtii in #1877
- vir, opt, std: system function buffers take byte views; DataView and typed arrays fast (#1718) by @andtii in #1803
- veltc: commands on several workspace members, --workspace, -p and --affected by @andtii in #1879
- std tests: fetch and the WebSocket client on velt test (#1778) by @andtii in #1894
- json: JsonValue on a tape in Velt (velt:json/tape), JSONC options, replacer functions and JsonValue.revive (#1660, #1666) by @andtii in #1829
- vir, sema: modified params of function values keep the caller's object; closures pass aliasable params on to closures, for sigx (#379) by @andtii in #1779
- sema, vir: member access on a union value cast to one member reads as JS does, for sigx (#379) by @andtii in #1874
- vir, opt, codegen:
neverfunctions are cold, one call per never-returning callee, no Ok path after them by @andtii in #1847 - velt:test and std tests: no silent leak check, tests/std on every OS, a channel instead of a 2 s poll, the 204 checks back by @andtii in #1899
- build: std functions compiled once per key and linked from the build cache (VELT_STD_OBJECT=1; #1728 step 3) by @andtii in #1911
- sema, vir: argument exclusivity for referenced insides,
anyto every numeric type, ICE panics without caller tracking by @andtii in #1853 - vpm, veltc: git dependencies on npm packages and whole npm workspaces by @andtii in #1895
- opt: small mutual recursion inlined into loops; leaf callees up to 120 are small by @andtii in #1848
- vir: callees quiet for borrows, and methods called directly, get borrows without counts by @andtii in #1849
- velt:test: the failure location after a multi-line message, and velt:regex only for pattern matchers (#1888, #1889) by @andtii in #1915
- docs: file a docs-sync issue on the website for user-visible changes by @andtii in #1918
- opt: local copies of counted pointers borrow their source by @andtii in #1850
- sema: an object literal's function-valued properties fill interface methods, also through any (#1886) by @andtii in #1891
- opt: more counted copies borrow: drop glue releases, nullable fields, interior pointers, read-only runtime functions by @andtii in #1851
- sqlite: the query engine's values and operators, with SQLite's own REAL conversions by @andtii in #1900
- veltc, velt_opt, std: velt test keeps results of test files that reach nothing outside the program by @andtii in #1920
- veltc: velt test on several members does not start a member whose tests cannot have changed (#1855 step 3) by @andtii in #1925
- sema: parts destructured from one value are separate places in a call (#1873) by @andtii in #1933
- sqlite: the query engine's scalar functions and printf by @andtii in #1901
- fmt: an index stays on the call it belongs to in a broken method chain (#1875) by @andtii in #1936
- vir, sema: equality fixes: number unions compare by number, deepEqual stops at cycles, toEqual on interface values (#1890, #1881, #1882) by @andtii in #1898
- sqlite: the query engine's date and time functions by @andtii in #1902
- sema: process.env.NAME == "x" reads the variable (#1871) by @andtii in #1931
- sqlite: b-tree seeks and backward scans for the query engine by @andtii in #1903
- sqlite: the query engine: SELECT compiled into closures over b-tree cursors by @andtii in #1904
- sqlite: the query engine's planner: access paths, join order, ORDER BY through an index by @andtii in #1905
- sema, vir: extend blocks on function types apply through bounds and whatever the function throws (#1878) by @andtii in #1922
- collections: ConcurrentMap with string keys (#1696 step 4.4) by @andtii in #1844
- sqlite: the query engine's statement API: typed rows, parameters, rows read as they are needed by @andtii in #1906
- sqlite: window functions in the query engine by @andtii in #1907
- vir: a function that may throw is called through any; a record's functions are called through any by @andtii in #1945
- std, opt: subarray of a u8[] is a Uint8Array over its bytes, everywhere; views check the bytes their buffer still has (#1718) by @andtii in #1923
- bench: a differential fuzzer of the SQLite engine against sqlite3, and scan and point queries by @andtii in #1908
- sema: object literals convert through any to interfaces written with type parameters (#1909) by @andtii in #1921
- sema: a function held by any converts to a member of another function type (#1935) by @andtii in #1937
- syntax: a top-level let a closure assigns stays module state in a script (#1872) by @andtii in #1929
- bench: showcase harness comparing Velt with Rust, Node and Bun by @andtii in #1949
- velt_doc: --format json for the docs website by @andtii in #1951
- bench: showcase pairs like with like, measures each program's own peak RSS, serves through velt:http/server by @andtii in #1955
- bench: the nightly makes bench/stdport's compressed inputs before it runs the benchmarks by @andtii in #1956
- tests: the wasm goldens skip every golden that declares a system function by @andtii in #1957
- sema: checking all of std costs less per line than before the SQLite and fetch code (#1950) by @andtii in #1958
- opt, std: drop glue tests null first; byte typed arrays test count (#1950) by @andtii in #1961
- std, opt: a constructed buffer keeps its length; null_exits calls a clone without the test (#1950) by @andtii in #1962
- std: final layout — velt/ modules, index.vlt, packages and a quality pass by @andtii in #1964
- velt_http: the client reads chunked response bodies by @andtii in #1980
- release: prepare 0.5.0 by @andtii in #1965
- sema: a dispatch group's ownership join takes in only the members that changed by @andtii in #1986
- test: the leak wait starts after a file's tests; a time limit per test process by @andtii in #1985
- http-server: the server tests order their events with gates, not delays by @andtii in #1991
- Crashes on valid programs: array views and empty byte arrays (#1963), generic types that grow by @andtii in #1968
- docs: the user docs live on veltlang.com; the repository keeps the internals by @andtii in #1984
- ci: catch tests that order events by timing before they merge by @andtii in #2000
- http-server: idle-timeout tests kept busy by a held request; limits tests close what they open by @andtii in #1998
- codegen, rt: --cpu's x86 features include the SIMD extensions (#1981 step 5a) by @andtii in #2012
- sema: a library's own thread boundaries reach the program's callbacks only through values it hands over by @andtii in #1995
Full Changelog: v0.4.0...v0.5.0