Repository navigation
Velt 0.1.0
Install
Linux and macOS:
curl -fsSL https://github.com/velt-lang/velt/releases/download/v0.1.0/get-velt.sh | shWindows (PowerShell):
irm https://github.com/velt-lang/velt/releases/download/v0.1.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
- codegen: JIT modules allocate from one arena on every platform by @andtii in #126
- vpm: the per-user directory is ~/.velt by @andtii in #127
- codegen: Windows arm64 unwind tables; honor MACOSX_DEPLOYMENT_TARGET by @andtii in #129
- Windows verification: daylight saving time test for other time zones by @andtii in #132
- design: package manifest written in Velt (#128) by @andtii in #133
- syntax: parser decides where JSX starts (#111) by @andtii in #118
- packages: native code in packages (prebuilt per-target libraries, runtime function table, sqlite prototype) by @andtii in #98
- vpm: read package.vlt, the manifest written in Velt (#128) by @andtii in #135
- velt:channel: typed channels with backpressure by @andtii in #119
- Small fixes: safe doc links, alias parameter names, options of zero-sized types, bench target dir by @andtii in #151
- syntax: lexer speed back to pre-JSX levels by @andtii in #152
- packages: the manifest is package.vlt (#128) by @andtii in #153
- sema: a use after a join blames every move that reaches it (Pool use after free) by @andtii in #163
- new Promise((resolve, reject) => ...) executor constructor by @andtii in #108
- release: tag-triggered release workflow and one-line installers by @andtii in #172
- fmt: keep comments inside object types by @andtii in #174
- packages: velt manifest check mode, registry errors name package.vlt, fmt reports velt.toml by @andtii in #158
- json: decode unions, literals, enums, tuples, Map and Record; edit JsonValue; parse options by @andtii in #140
- ci: run the checks a change needs, in parallel jobs, with a cache that is reused by @andtii in #179
- docs: refresh stale docs and comments after recent rounds by @andtii in #178
- lsp: JSX completion, definition and hover; scope walker descends into elements by @andtii in #170
- registry: yank, owners, search, per-user tokens; https without curl by @andtii in #173
- velt_rt: race test checks the order of events, not a wall-clock bound by @andtii in #237
- Codegen: Cranelift memory on huge functions, LLVM codegen units, Cranelift and JIT line tables by @andtii in #105
- prelude: splice, truncate, flat, JS join, localeCompare, Number.*, assertThrows by @andtii in #177
- tests: never relink an executable that has just run by @andtii in #215
- tests: timer goldens ordered by awaits, not by how fast tasks run by @andtii in #248
- tests: format two goldens; difftest writes integer division as Math.trunc and builds again by @andtii in #253
- json: a type with private fields has no JSON form (no forged runtime handles) by @andtii in #245
- Promise.all rejects as soon as one promise rejects by @andtii in #112
- std: Node-style IoError messages and locations, no body headers on 204/304 by @andtii in #168
- lower: read a returned place before the function's cleanup frees it by @andtii in #258
- editors: package.vlt is a manifest, not a program (#128) by @andtii in #246
- fmt: JSX layout like Prettier ({" "} at line breaks, JSX-mode conditionals) by @andtii in #159
- tests: velt_vir native tests use the gate's prebuilt runtime by @andtii in #260
- xtask: check tests/difftest; difftest corpus agrees on crypto and datetime by @andtii in #269
- prelude: ES2023 copying array methods (toSorted, toReversed, toSpliced, with) by @andtii in #244
- velt:task: AbortController/AbortSignal, timeout(p, ms) and taskScope by @andtii in #120
- lsp: inlay hints and mutating highlighting for inferred throws and mutation by @andtii in #180
- tests: three more goldens ordered by awaits, not by how fast tasks run by @andtii in #261
- fmt: linear tidy of JSX children by @andtii in #281
- lsp: semantic token range and delta, workspace symbol index with file watcher, fix all in file by @andtii in #181
- dev: a save during a build always leads to another build by @andtii in #275
- editors: live registry data in package.vlt (#128) by @andtii in #288
- velt_rt: deleting JSON object members is checked for linear work by counting, not timing by @andtii in #283
- lsp: closing tags as names, innermost element after </, JSX completion and hint fixes by @andtii in #285
- codegen: place codegen units by the call graph and split large programs by default; velt dev JIT timings; nightly memory stress by @andtii in #289
- sema: std membership comes from the loader; only std declares runtime functions by @andtii in #282
- Fix the bugs from the virtual actors port (#182), their follow-ups and small std gaps by @andtii in #257
- difftest runs nightly; TZ names UTC or a fixed offset on Windows too; randomInt checks its bounds like Node by @andtii in #286
- tests: velt dev sessions end their programs and remove their directories by @andtii in #295
- velt_rt: task tests wait on the signal and count polls instead of timing by @andtii in #301
- sema: a finally runs after a return, break or continue in its try by @andtii in #293
- sema: a field taken out of a class instance doesn't make the root owned (getter results are shares) by @andtii in #296
- vpm: velt.lock.json, index.json and native.json replace the TOML files by @andtii in #294
- sema: a closure capture used again shares only that variable, not the closure's other captures by @andtii in #302
- process: stdout.write, stderr.write and env on the builtin process by @andtii in #308
- native: outside std, declare function names only the package's own native exports by @andtii in #303
- golden: values captured by a spawned task stay intact across an await by @andtii in #312
- tests: goldens that raced short timers against main are ordered by awaits by @andtii in #307
- sema: class methods returning a promise carry their errors in the promise, like interface methods by @andtii in #306
- registry: removed users lose ownership, tokens only over TLS or loopback, client deadlines, durable and locked writes by @andtii in #313
- process: envAll() lists every environment variable by @andtii in #321
- tests: leak checks for the task_scope and task_abort goldens by @andtii in #322
- ci: comment-only Rust edits check only their crate; a failed queue job cancels the rest by @andtii in #235
- editors: registry lookups with short deadlines, only over TLS or loopback; no line breaks in HTTP requests (#317) by @andtii in #323
- ci: orphaned merge-queue runs check nothing; wasmtime comes from the cache by @andtii in #325
- velt check: library modules need no main; goldens for #83 and #242 by @andtii in #327
- packages: description and keywords in package.vlt, matched by search (#184) by @andtii in #333
- vpm: a prebuilt bundle's exports must be its library's own; reserve libc-prefix package names by @andtii in #311
- json: decoded map keys own their bytes (a temporary source is freed after the parse) by @andtii in #338
- http: registry keys for servers and responses; std handle fields are private by @andtii in #274
- JSON and class follow-ups: private constructors, generic recursion, record diagnostics, deepEqual, JsonValue printing and speed by @andtii in #336
- velt check: a package checks every module under src/ and tests/ by @andtii in #355
- difftest: no JSON for classes with private fields by @andtii in #361
- velt_http: one request check: no control characters, no ambiguous host by @andtii in #334
- child_process: flush buffered stdout before starting a child that inherits stdio by @andtii in #324
- velt_rt: a line logged before handing work to another task prints first by @andtii in #318
- xtask: find the workspace root at run time and print it by @andtii in #348
- types: readonly fields in object types; design for shared models (#326) by @andtii in #362
- sema, syntax, std: TypeScript compatibility round 1 (JS numbers from std, scripts, callback indexes, rest parameters, Date) by @andtii in #360
- loader: .ts and .tsx modules alongside .vlt by @andtii in #368
- sema: boolean is the bool type, and types print as boolean by @andtii in #364
- sema: a generic object alias's instance and the written object type are a type error again (#362 regression) by @andtii in #390
- hir: per-field privacy; console.log hides only private zero-sized fields by @andtii in #394
- types: an interface with only fields is an object type (#326, #61) by @andtii in #397
- strings: design for JavaScript (UTF-16) semantics, reference model and benchmark (#377 phase 0) by @andtii in #403
- velt login/logout: registry tokens stored per registry; no token over plain http to another host by @andtii in #315
- examples/chat: tell only the members already in the room that someone joined by @andtii in #406
- types: Partial, Required, Readonly, Pick and Omit on concrete object types (#326) by @andtii in #409
- velt check --ts-compat: lint for the TypeScript/Velt common subset (syntax rules) by @andtii in #399
- Thread-boundary transfers, JavaScript initialization order, TS conformance and reliable timing tests by @andtii in #404
- golden: errors_async's failing spawned tasks are far apart in time by @andtii in #420
- velt_fmt: the whitespace fuzz test never adds a blank line, and seeds each file from its path by @andtii in #426
- velt_rt: promises woken by timers in the same tick resume in timer order by @andtii in #316
- packages: a description may have 300 characters by @andtii in #419
- process: remove env() and stdout.writeString() (process.env and process.stdout.write replace them) by @andtii in #408
- sema: Omit accepts keys that aren't fields, and utility types ignore declaration order (#418) by @andtii in #430
- tscompat: tsc oracle for the lint rules, run nightly by @andtii in #433
- tests: start child processes without a console window on Windows by @andtii in #427
- sema: a forwarding closure passed to a generic parameter owns what it forwards by @andtii in #393
- native: exports are named velt___…; one-to-one package names; rt, sig and native are reserved by @andtii in #396
- lowering: recursive object types are boxed, JSON reports cycles, and unused aliases are checked (#376) by @andtii in #448
- velt_rt: uncaught errors from async main and spawned tasks report where they were thrown by @andtii in #332
- velt_vir, velt_rt: s += x appends in place (amortized O(1) per append) by @andtii in #428
- Iteration: protocol, generators, async generators and for await by @andtii in #412
- tscompat: jsx-pragma-comment; docs show the block-comment pragma by @andtii in #449
- tscompat: tsCompat folders in package.vlt, velt check --ts-compat in a package, live findings in the editor by @andtii in #450
- lowering, velt_rt: console.log prints cyclic object graphs like node (#445) by @andtii in #452
- tests: remaining test processes start without a window when the test run has no console by @andtii in #442
- Mutex.with and constructor memory safety; TypeScript-compatible numbers and switch by @andtii in #461
- process: process.argv with Node's layout [runtime, script, ...args] by @andtii in #434
- tscompat: typed rules for velt check --ts-compat (type query in sema ide, null-default) by @andtii in #466
- velt_rt: a dropped spawn handle whose task rejects reports an unhandled rejection by @andtii in #339
- velt_fmt: the whitespace fuzz test reports code changes apart from layout by @andtii in #423
- sema: compound assignment and ++/-- on accessors run getter, then setter, receiver once by @andtii in #447
- Iterables: builtin iterables, iterator types, spread/Array.from/destructuring of any iterable, generator expressions by @andtii in #470
- strings: every string carries its UTF-16 unit count (#377 phase 1) by @andtii in #453
- sema: reading a promise out of an array or a Map is a compile-time error by @andtii in #380
- std: Array.prototype.shift() and unshift() by @andtii in #472
- bench: the db and regex-redux benchmarks compile again, and the gate compiles bench/ by @andtii in #473
- lowering, velt_rt: console.log prints a promise's state like Node by @andtii in #477
- velt_rt: Windows debug programs no longer hang at exit while a worker holds the allocator's quarantine lock by @andtii in #478
- sema: a Mutex.with callback may read the fields next to a shared mutex by @andtii in #479
- process.argv: velt test sets the test file, velt run passes what follows the file, resolved executable path by @andtii in #485
- lowering: float map keys compare by SameValueZero, and the hash agrees by @andtii in #481
- std/url: a '..' that empties nothing leaves a non-special URL's path empty, like Node by @andtii in #486
- velt_rt, lowering: console.log numbers <ref *N> once per argument, like Node by @andtii in #469
- sema: a resource without clone() stored into a Mutex value must not stay usable outside the lock by @andtii in #484
- tests: one shared no-window command() helper for test child processes by @andtii in #491
- tests: the golden harness kills the program velt run started when a golden times out (#475) by @andtii in #489
- tests: a local closure that pushes into a captured array leaves it usable by @andtii in #492
- strings: lone surrogates at every boundary, breadcrumbs and code-unit translation (#377 phase 2a) by @andtii in #488
- loader: case-exact module resolution, hidden folder warning, TypeScript packages; LSP index scope by @andtii in #494
- console.log: break long values across lines like node's util.inspect by @andtii in #496
- sema: Mutex.with accepts callbacks from fields, arrays and Map values when no function of their type crosses the lock by @andtii in #476
- velt_syntax: linear parsing of nested conditionals by @andtii in #499
- std: setTimeout, clearTimeout, setInterval and clearInterval are globals, as in TypeScript by @andtii in #500
- sema: record_keys, json and promise_copies linear in program size by @andtii in #502
- tests: std/jsx_async orders components by channels, not sleeps by @andtii in #504
- std: pending timers keep the process alive, with Timer.unref(), ref() and hasRef() as in Node by @andtii in #511
- TypeScript compatibility: inference, classes, conversions, identity, JSX generics by @andtii in #454
- velt_rt, velt_rt_wasm: a dropped AbortSignal.timeout signal frees its timer by @andtii in #526
- tests: spawn_handles_handled orders its race and all losers with a channel, not timers (#510) by @andtii in #528
- lsp: import completion, module specifiers and auto-import by @andtii in #522
- velt_rt: a main that fails ends the process even while a server is listening by @andtii in #534
- transfer: one copy per object reached twice, cycles copied as cycles by @andtii in #507
- tests: the ts_compat Node oracle builds the native runtime it links against by @andtii in #536
- sema: a float initial value gives reduce a float accumulator, not the callback index's i64 by @andtii in #537
- difftest: Node prints with its default console.log layout, which Velt follows since #496 by @andtii in #538
- console.log: node's depth and maxArrayLength limits ([Object], ... n more items) by @andtii in #541
- link_check: count stdout writes instead of timing line-buffered output (#346) by @andtii in #542
- codegen_llvm: whole-number fast path for % on f64 by @andtii in #545
- sema: variables that closures assign are not narrowed by @andtii in #540
- velt_rt_wasm: timers fire in deadline and creation order, not when a poll finds them due by @andtii in #553
- nightly: count each benchmark's instructions and fail beyond 3% of the last accepted counts by @andtii in #554
- bench: TypeScript-style workloads against Rust and Node (bench/typical) by @andtii in #546
- transfer: look up copies only for types a transfer can reach through closures, interfaces and class hierarchies by @andtii in #547
- codegen_llvm: inline fast paths for string drop, equality and one-byte slices by @andtii in #552
- docs: Velt is a native backend language; TypeScript is the starting point, not the limit by @andtii in #556
- velt_rt, velt_rt_wasm: a combinator's loser that is ready runs before the awaiter continues, like Node by @andtii in #505
- tests: build the shared runtime with the static one and fail on a stale runtime library (#509) by @andtii in #551
- strings: length, positions and ordering count UTF-16 code units, as in JavaScript (#377 phase 2b) by @andtii in #519
- numbers: JS int32 operators on numbers, exact and fast (#521) by @andtii in #549
- velt_opt: scalar replacement of non-escaping heap objects (#533) by @andtii in #550
- tests: VELT_GOLDEN_WORK moves every end-to-end test's build directory by @andtii in #566
- sema: a -0 literal keeps its sign where a number is expected or inferred (#562) by @andtii in #567
- std: sort(cmp) is a driftsort-shaped stable sort through a scratch buffer by @andtii in #548
- sema: switch accepts what TypeScript accepts (non-exhaustive, computed and duplicate cases) by @andtii in #568
- sema: accessor assignments as values yield the right-hand side; ??=, ||=, &&= on accessors can be values by @andtii in #569
- json: JSON.stringify leaves out an absent optional field of object types and interfaces (#463) by @andtii in #583
- sema: compound assignments evaluate their target's object and indices once by @andtii in #582
- codegen: Math.floor/ceil/trunc/round inline on baseline x86-64 (#535) by @andtii in #588
- runtime: a due timer waits for its turn; task_abort golden no longer races the clock by @andtii in #597
- fetch: the WHATWG fetch, Request, Response and Headers as globals by @andtii in #577
- perf: one Map probe for get + set, inline short-string hash and literal compares by @andtii in #557
- runtime: each debug allocator has its own quarantine by @andtii in #609
- reload: in_flight holds /slow on a gate the test opens after the swap by @andtii in #610
- sema: TypeScript follow-ups: super() in both branches, spreads into nullable numbers, written types in fixes, Object.keys on interface values by @andtii in #587
- docs: a fresh agent per batch, stacked pull requests, WSL build output on the bigger disk by @andtii in #628
- lowering: closures only ever called where they are created keep their environment in the frame by @andtii in #603
- ES private names (#x) in classes: fields, methods, accessors, statics and brand checks by @andtii in #599
- examples: actors, a virtual-actor runtime after @sigx/actors by @andtii in #640
- velt_opt: numrep — proven integer representation for number locals (#525 step 2) by @andtii in #621
- sema: jsxTextSeparator between adjacent text parts of precompiled templates; provider placeholders for true/false/null by @andtii in #637
- sema: closures held in a const and only called borrow, and const me = this, so they leave the class uncounted by @andtii in #602
- velt_rt: channels move each item as one copy into a ring of fixed-size slots by @andtii in #643
- Intersection types, indexed access and branded types; extending JSX IntrinsicElements by @andtii in #649
- Revert "velt_rt: channels move each item as one copy into a ring of fixed-size slots (#643)" by @andtii in #655
- velt_vir, std: callbacks that change their array through an alias keep valid arguments by @andtii in #571
- tests: no load-dependent timing; LLVM tools through pipes by @andtii in #648
- velt_opt: heap_sroa copies a write to the object's other names (#558) by @andtii in #575
- velt_opt: drop the zero fill of new objects whose fields are all written first (#560) by @andtii in #576
- velt_opt: devirtualize calls on objects whose class is known from their allocation (#559) by @andtii in #586
- velt_rt: channels move each item as one copy into a ring of fixed-size slots (re-land #643) by @andtii in #658
- fetch: decode gzip, deflate and br; res.body streams the body by @andtii in #594
- fetch: globals a module binds don't load; static and instance namespaces; fetch on WebAssembly; client benchmark by @andtii in #600
- sema: local async closures share and may modify their captures by @andtii in #659
- lower, runtime: drop long chains without overflowing the stack by @andtii in #656
- lowering, sema: a compound assignment writes to its element after the right-hand side ran; the debug allocator catches writes after free at exit by @andtii in #626
- build: debug builds carry line tables only; dependencies without debug info by @andtii in #639
- tests: golden for
?.reads that are the last use of their object (#657) by @andtii in #661 - runtime: drop values still queued in channels when the program ends by @andtii in #663
- fetch: take back #577's per-request cost; text() validates UTF-8 the fast way by @andtii in #665
- runtime: shared string slices, so rest = rest.slice(n) parsers are linear by @andtii in #666
- docs: bring the reference, std, tooling and contract docs in line with main by @andtii in #670
- velt_doc: JSDoc and /// doc comments with tags; migrate std by @andtii in #520
- std: prelude doc comments, seeded from TypeScript's lib by @andtii in #524
- lsp: show doc comments in hover, completion and signature help by @andtii in #523
- docs: deferred types design, revised for the #395 review and the owner's decisions by @andtii in #686
- sema: generic object types instantiate canonically; optional fields are part of the type (#395 P1, P2) by @andtii in #684
- jsx:
jsxSoleEmptyrenders a sole null/boolean child in precompiled templates (#634) by @andtii in #673 - velt:jsx: precompiled pages keep their markup as a tree; jsxTemplateString; text escapes quotes in both lowerings (part of #77) by @andtii in #676
- examples: server-rendered blog with TSX (#79) by @andtii in #678
- velt:jsx: SVG and MathML elements; children of void elements are a compile error (#87) by @andtii in #675
- examples: seek, a parallel grep/ripgrep-style search app by @andtii in #689
- docs: design for typed causes of render errors (#82) by @andtii in #713
- ci: a bench-arm workflow runs the jsx and web benchmarks on Linux arm64, for #77 and #78 by @andtii in #700
- jsx: lists of rows without slots are built from strings (jsxList); number children are ${n} (part of #77) by @andtii in #682
- docs: TSX in the language reference and a book chapter on server-rendered pages (#81) by @andtii in #712
- examples: shop-api, a JSON-heavy REST service with a Node twin and a load benchmark by @andtii in #706
- std/fs: readDirEntries (Node's Dirent), lstat, readlink, symlink; Stats gets Node's methods by @andtii in #725
- std/process: stdout/stderr/stdin.isTTY and isatty(fd); fetch's init types are global by @andtii in #728
- jsx follow-ups: contract paths, sole_template, a whole-ref A/B for bench/jsx, ssr-blog stream order and Node comparison by @andtii in #711
- sema: the with-check summaries re-walk a function only when a callee's summary changed by @andtii in #775
- ci: run velt test for every example app by @andtii in #738
- sema: channel send gets spawn's compile-time copy check; RegExp.clone() never throws by @andtii in #770
- dev: no reload follows a recent velt add (manifest, lockfile and fetched packages are covered from the first build) by @andtii in #767
- http: handlers take and return the global Request and Response by @andtii in #671
- TS compat: import { process }, chained sort(), void callbacks returning values, arr.length = n by @andtii in #776
- examples: redis-clone, a Redis-compatible server checked against redis-server and redis-benchmark by @andtii in #722
- sema, velt_opt: number is a JavaScript number (#525 step 3) by @andtii in #685
- sema: module constants initialized by pure calls by @andtii in #773
- sema: a union local narrowed to several printable members formats and prints by @andtii in #800
- async: resolve() for Promise, Promise.resolve/reject, timer callbacks without a promise and Node's setInterval schedule by @andtii in #780
- examples: sigx-ssr, a sigx app with a native Velt server (packaging, Vite/HMR, router, streaming, server functions) by @andtii in #801
- TS compat: toJSON in JSON.stringify, console.log of fetch types, [object Object] in templates, Node differences by @andtii in #791
- sema: TypeScript compatibility: spreads into fixed parameters, let typed by assignment, property patterns, ?? unions, const case values by @andtii in #787
- bench: count_check.sh --prepend measures all_std.vlt with one more line by @andtii in #847
- bench/web: the fortunes test in TSX (velt-tsx) (#78) by @andtii in #677
- lower: a template literal with string parts is sized once from its parts (step 2 of #77) by @andtii in #707
- sema: object types convert by field name (#651, #650); recursive aliases through & (#654) by @andtii in #768
- lower: a template literal reuses the buffer of a long fresh part (part of #77) by @andtii in #739
- toolchain: bundled lld and link kits; velt build needs no Build Tools, Xcode or cc by @andtii in #853
- sema: inherited statics, private names in nested functions, #x in nullable, private accessor errors by @andtii in #816
- veltc: split the wasm32-wasip1 goldens into eight test shards by @andtii in #860
- jsx: a string child is escaped by jsxEscapeString, an optional provider export (part of #77) by @andtii in #759
- sema: === with a union member, instanceof joined by ||, methods as values (#741, #747, #746) by @andtii in #788
- TS compat: quoted property names; o["k"] reads the field by @andtii in #826
- sema: JavaScript truthiness for numbers and strings; || and && return an operand by @andtii in #822
- veltc: registry_cli test no longer races velt login's refusal (BrokenPipe) by @andtii in #875
- tests: a narrowed union with a promise-holding member formats (#84) by @andtii in #824
- velt_rt: the leak check counts blocks at one moment (flaky promises_all_spawned_children) by @andtii in #879
- lower: borrows rooted in a shared cell keep the value alive (#819) by @andtii in #861
- cross-compiling: velt target add and target packs; velt build --target for every released target from any host by @andtii in #874
- TS compat: string + number, arrays in template literals (also of classes with toString()), Set/RegExp/TextEncoder/TextDecoder/structuredClone as globals by @andtii in #785
- lowering, sema, std: JS order for assignment targets, live Map iteration, Date setter years by @andtii in #812
Full Changelog: https://github.com/velt-lang/velt/commits/v0.1.0