Releases: muxlang/mux-compiler
Releases · muxlang/mux-compiler
Release list
v0.6.0
[0.6.0] - 2026-07-18
Changed
- BREAKING:
{}is now always the empty set; the empty map is{:}.{}in
a map-typed position no longer resolves to an empty map - it is a compile error
that points at{:}, and the reverse ({:}where a set is expected) reports
the same way. Migration is mechanical:map<K,V> m = {}becomes
map<K,V> m = {:}. Set literals are unaffected. This supersedes the contextual
{}resolution added in 0.5.0:Type::EmptySetOrMapand its span-keyed
override map are removed, so the set/map ambiguity no longer reaches semantics
or codegen. Closes #266. - Valgrind and benchmark PR reports render as charts: the PR comment now shows
a leak split pie, per-phase median bars, and an exact-numbers table instead of
raw log dumps; raw logs stay in the collapsed details. All rendered values are
whitelisted or numeric-validated since Build artifacts are fork-controlled (#267). - CI fails on orphaned insta snapshots: deleting or renaming a
test_scripts/
file no longer strands its snapshot as phantom coverage; 52 accumulated orphans
were deleted and the gate keeps new ones out (#271).
Added
ifexpressions supportelse ifchains and multi-line branches: anif
used in expression position (auto g = if c { a } else { b }) previously
accepted only a single-line, single-elseform. It now acceptselse if
chains and branches whose value spans multiple lines, matching the statement
form. Each branch is still a single value expression; a chain parses as a
nested if-expression, so no new AST shape, semantics, or codegen was needed
(branch type-agreement checks still apply). Closes #281.
Fixed
++/--on a captured variable inside a closure: a standalonecount++
in a lambda body was rejected by the parser's no-postfix-in-expression guard as
if it were nested in an expression, even though a barex++statement is valid
anywhere. The guard now only rejects a postfix++/--genuinely nested inside
a larger expression (e.g.a + y++), which stays disallowed by design. Codegen
already handled the captured increment. Closes #280.- Match-arm bindings no longer leak past the match: a match-arm pattern
binding (e.g.ninn if n % 2 == 0) or an arm-body local stayed in the
codegen variable table after the match, so a later declaration reusing the
name (auto n = 3) reused the arm-local slot. That slot's alloca lived in a
conditional arm block that did not dominate the later store, so the program
failed with invalid LLVM IR ("instruction does not dominate all uses"). Match
bindings are now scoped to the match; a subsequent same-named declaration gets
a fresh slot. Reassignment of an outer variable inside an arm still persists. - Recursive and mutually-recursive functions in imported modules: a call to
a function in the same imported module (including a recursive self-call) was
emitted against the bare, unmangled LLVM name and failed with "Undefined
function: ". The current-function name recorded while generating an
imported module body is now the mangledmodule!name, so same-module calls
resolve through the existing nested-name logic. A related failure - a
non-identifier argument such asn - 1in a recursive call reporting
"Undefined variable" - is fixed by resolving argument types through the
codegen fallback tables when the analyzer's function scope is unavailable. - Cross-module constant access: reading a
constdefined in an imported
module through the module namespace (math.PI) now compiles. Previously only
stdlib module constants resolved; a user module constant fell through to
"Field access not supported for expression type Identifier". The module's own
code could already read the constant; only the namespaced access from an
importing file was missing. A same-named local in the caller does not shadow
the module constant. (Known limitation: two imported modules that declare the
same-named constant collide under the flat global-name model, tracked in #279.) - Compound assignment and increment on class fields:
self.value++,
self.value += n, and theobj.fieldforms now compile. Previously++/--
on a field failed codegen with "Cannot increment on non-identifier" and+=/-=
with "Assignment to non-identifier/deref not implemented", even though semantic
analysis accepted them. Both now route through the same field-store path as a
plainobj.field = ...assignment, so reference counting and where-clause field
invariants still apply. autonow rejects nested empty collections consistently:auto x = {1: []}
andauto x = [[]]previously passed semantic analysis with an unresolved
element type, while the set/map equivalents were caught. All empty collection
kinds are now guarded.- Empty-collection inference help text: suggested
{}for every collection,
including lists (list<int> myVar = {}). Each kind now shows its own literal
syntax ([],{:},{}).
Security
- Lockfile bump for the postgres stack:
postgres-protocol0.6.11 -> 0.6.12
(RUSTSEC-2026-0179 SCRAM CPU-exhaustion DoS, RUSTSEC-2026-0180 hstore decode
panic) andtokio-postgres0.7.17 -> 0.7.18 (RUSTSEC-2026-0178 short DataRow
panic);postgres-types0.2.13 -> 0.2.14 moved with the stack (no advisory of
its own). Transitive via mux-runtime'spostgresdependency;cargo auditis
clean again.
v0.5.0
[0.5.0] - 2026-07-13
This release completes the split of the former monorepo into independent repos.
mux-compiler is now the canonical "Mux version" and resolves/reports the runtime
version independently; the runtime, website, playground API, and syntax
highlighting each live in and version from their own repos. Requires
mux-runtime 0.5.0.
Added
- Where-clause constraints:
where { expr, ... }attaches runtime constraints to
functions, methods, lambdas, interface methods, enum variants, fields, and classes.
Provable violations are compile errors (zero-false-positive); the runtime panic is the
fallback. Closes #224 (#235). - Reject provable runtime panics at compile time: The compiler now turns provable
runtime panics into compile-time errors, using the zero-false-positive const-fold path.
Closes #238. cargo benchharness (criterion): Compiler-phase benchmarks (lex,parse,semantics,
codegen, end-to-endpipeline) run over the whole compilingtest_scriptscorpus, plus
end-to-endexecutionthroughput benchmarks for a curated set of compiled workloads. A
stdlib-onlyscripts/bench-report.pyaggregates the per-file medians into a box-and-whisker
per phase. Benchmarks are local/manual and a non-blocking CI report, never a merge gate.
Closes #247.- Valgrind memory checking: CI now runs compiled programs and the compiler under Valgrind
(Memcheck), gating on definite/indirect leaks and memory errors with checked-in suppressions
for benign third-party noise. Closes #246. - Range-literal syntax diagnostic: A targeted diagnostic for a digit followed by
..
(range-literal syntax) replaces the previous generic parse error. Closes #245. - Independent runtime version resolution: The compiler resolves and reports the runtime
version independently of its own version, somux --versionreports both (e.g.
mux 0.5.0 (runtime 0.5.0)).
Changed
- Repo split from the monorepo: Extracted the runtime, website, playground API, and syntax
highlighting into their own repos; removed the rootVERSIONfile andsync-versiontooling;
scoped the SonarCloud analysis to the compiler; and rebound the project identity to
muxlang/mux-compiler. Internals documentation now points atmuxlang/mux-context. - CLI polish: Colored diagnostics, styled help output, doctor glyphs, a version banner, and
a compile spinner. Closes #249. - Runtime panic documentation and behavior updated (#225, #230).
- Removed ad-hoc perf tooling: Deleted
scripts/measure-baseline.sh,
scripts/check-timings.py, and the orphanedinfra/ci/baselines/*.jsontiming budgets, and
stripped the unused--timings-fileplumbing fromrun-checks.sh/integration-checks.sh.
Also removed the unusedcargo-fuzzsetup undermux-compiler/fuzz/. - Slimmed the README to a real README and pointed internals at
muxlang/mux-context.
Fixed
mux build/mux runnow fail on link errors: A failedclanglink previously printed
the error but exited 0 (buildreported success with no executable;runcould fall through
and execute a stale binary from a prior build).report_clang_output_or_exitnow exits
non-zero as its name implies.- Reference-counting correctness: Reference-count cleanup for owned temporaries plus
init/copy correctness fixes (#253); closures are now allocated with a reference-count header.
Closes #250 (#252). - Collection read-path performance and correctness: Fixed O(n^2) indexed reads,
runtime-cache staleness, and Python-style negative indexing on collection reads
(#256, #258, #259, #260). matchusable as a statement:matchnow works as a statement and the guarded-arm
exhaustiveness hole is closed (#233, #234, #243) (#242).- Trailing commas: Allow trailing commas before newline-closed collection delimiters (#244).
- Enum codegen: Load enums from boxed pointers correctly in codegen (#237).
- Release checksum verification: Verify release checksums by hash, not path.
Security
cmov0.5.3 -> 0.5.4: Bumped to fix GHSA-3rjw-m598-pq24 (#254).
v0.4.1
[0.4.1] - 2026-06-27
Fixed
- Windows CI linker failure (
xml2.lib): The conda-forgelibxml2packages do not install any.libimport library intoLibrary/lib/, causingLNK1181: cannot open input file 'xml2.lib'onwindows-latestrunners. Fixed by adding a dedicated step after MSVC toolchain setup that generatesxml2.libfrom the installedlibxml2*.dllusingdumpbin /exportsandlib.exe.
v0.4.0
[0.4.0] - 2026-06-26
Added
- Mux AI documentation assistant: In-docs chat widget powered by a Cloudflare Worker (RAG over
mux-website/docs/via Vectorize + Llama 3.3 70B). Answers Mux questions with citations, explains compiler errors, and rejects off-topic queries. Includestools/docs-indexer/for re-indexing andtools/retrieval-test/eval harness (8/8 retrieval, 19/19 error-explainer). Full runbook inworkers/mux-ai/README.md. - DSA stdlib expanded: Added
algorithm.mux(generic graph algorithms: topological sort, cycle detection, DFS, BFS),graph.mux(adjacency-list directed graph),bintree.mux(binary tree with inorder/preorder/postorder traversals),heap.mux(min/max heap),queue.mux(FIFO),stack.mux(LIFO), andcollection.mux(base Collection interface). Closes #203. to_char()conversion method: Implementedstring.to_char() -> result<char, string>andint.to_char() -> char(Unicode code-point to char). Closes #207.to_list()on set and map:set<T>.to_list()andmap<K,V>.to_list()now registered and callable. Closes #209.
Changed
- LLVM upgraded from 17 to 22: Migrated inkwell dependency and all CI/build tooling to LLVM 22, which is more broadly available and actively maintained. Closes #215.
- Dead code elimination: Unused symbols (variables, classes, enums, functions, generics) are no longer emitted to LLVM IR, reducing binary size and intermediate output. Closes #200.
- Minimal end-user installation: End-user installs now ship only the compiler binary and runtime; development tooling (LLVM, clang, analysis tools) is separated into the dev setup path. Closes #193.
- God Object refactor: Broke down oversized structs/impls in the compiler (semantic analyzer, codegen context) into smaller focused components. Closes #194.
- Improved error messages for collection types: Set and map type errors now display
set<T>andmap<K,V>instead of raw brace-syntax ({char},{string: int}). Closes #210. - Improved error for
.new()on built-in collections: Callinglist.new(),map.new(), orset.new()now emits a helpful diagnostic suggesting[]or{}literal syntax instead of a generic undefined-type error. Closes #204. - SonarQube and Greptile cleanups: Addressed code quality findings across multiple passes: god-object decomposition, vulnerability dependency updates, and ESLint/security-hotspot fixes in the website.
Fixed
voidfunctions require explicitreturn: Functions declaredreturns voidwithout areturnstatement now produce a compile-time error instead of silently compiling. Closes #211.- Map
{}literal compiled as Set:map<K,V> m = {}previously produced aValue::Setat runtime, causing segfaults on map operations. Fixed by resolving{}type contextually during semantic analysis (SetOrMapLiteral) so codegen emitsmux_new_mapvsmux_new_setcorrectly. - Struct layout corruption in interface-implementing classes: Inline constructor initialization used positional field indices instead of the interface-aware field map, causing the first real field's data to overwrite the vtable slot. Affected all classes implementing interfaces.
- Non-primitive field initialization in class constructors: Non-generic class constructors (e.g.,
Graph.new()) zero-initializedlist/map/setfields as null instead of real empty collections. - Generic class vtable generation crash:
generate_class_vtables()attempted to build vtables using unspecialized method names (e.g.,Graph.len) which do not exist; generic classes only have monomorphized instances. Vtable generation is now skipped for generic classes (interfaces use static dispatch). - Cross-module import ordering:
collect_hoistable_declarations()ran before imports were resolved, so classes in a file could not see imported interfaces during the hoisting pass. Imports are now processed during hoisting;expression_type_overridesfrom submodules are also merged so empty{}literals are correctly disambiguated. Closes #203. Type::Modulepanic:resolve_type_with_seen()andllvm_type_from_resolved_type()panicked onType::Moduleinstead of returningErr, breakingmodule.CONST.method()call patterns.- Website frontend examples: Audited and corrected all code examples and interactive demos on the documentation site; removed a stale debug log from the compiler.
- Dependency vulnerabilities: Updated website and tooling dependencies to resolve known CVEs.
v0.3.2
[0.3.2] - 2026-06-13
Changed
- SonarQube quality issues resolved: Replaced
unreachable!()indeep_clone_valueforValue::Objectinside containers, fixed UB in sync unlock arm, replaced 7.expect()calls with proper error propagation, and extracted duplicate constructor helpers. - Code duplication reduced: Overall project duplication dropped from 4.5% to 3.9%. Extracted module-level expression helpers in
methods.rs, merged duplicate equality and return value arms instatements.rs, and added signature macros to compact ~40 runtime function declarations. - Version metadata updated: All configuration files bumped from 0.3.1 to 0.3.2.
Fixed
- Segfault when running
cargo test:LD_LIBRARY_PATHwas checked beforeDT_RUNPATH, so the workspace.sowas loaded instead of the cached release.so. Added-Wl,--disable-new-dtagsto forceDT_RPATH, which is checked beforeLD_LIBRARY_PATH. - LLD linker flags: Removed
-no-pieflag to fix LLD compatibility on modern Linux distributions.
v0.3.1
[0.3.1] - 2026-05-31
Changed
- Class constructor rules clarified and enforced:
newis reserved for compiler-generated class constructors and cannot be user-defined in class bodies. - Class creation guidance updated: Documentation now consistently describes class initialization as
ClassName.new()followed by field assignment, or via named factory methods such asfrom(...)andwith_<feature>(...). - Version metadata updated: All configuration files (Cargo.toml, package.json, tree-sitter.json, README badge, PR template, VERSION) bumped from 0.3.0 to 0.3.1.
- Grammar and parser adjustments: Updated language grammar to reflect constructor rules, ensuring accurate syntax highlighting and parser diagnostics.
Fixed
- Parser diagnostic quality: Defining
func new(...)in a class now reports one targeted parser error instead of cascading with a secondaryExpected expression, found '}'error. - Documentation and examples accuracy: Updated docs and examples that previously defined
newor called class.new(...)with arguments so they match current language behavior. - Stale runtime library cache: Cleared cached
libmux_runtime.athat was missing newer symbols, preventing linker errors for enum-related runtime functions.
v0.3.0
Added
- Syntax highlighting support: Added TextMate and Tree-sitter grammar support with setup guidance for VSCode, Sublime Text, JetBrains, Neovim, and Helix.
- Setup documentation: New
mux-website/docs/setup.mdwith language installation and editor configuration guides.
Changed
- Profiling decoupled: Removed built-in profiling infrastructure (
mux-profilingcrate) from compiler and runtime. Profiling now uses external tools (perf, Instruments, WPA) only. - Code quality improvements: Pinned GitHub Actions versions, added
--lockedto cargo commands, added Cargo.lock files, refactored Python and JavaScript generators to fix SonarQube findings.
Fixed
- Code review cleanup: Removed orphaned profiling scripts, cleaned up empty scope blocks in compiler, and fixed numbered list in CONTRIBUTING.md.
v0.2.1
[0.2.1] - 2026-04-22
Changed
- Compiler maintainability work: Reduced complexity across compiler modules with a broad cleanup and refactor pass.
- Standard library internals: Refactored and optimized stdlib implementations for better consistency and maintainability.
- Developer workflow and project metadata: Updated AI agent guidance, OpenCode configuration, and supporting repository automation files.
- Documentation and website updates: Improved README content and landing page structure, examples, and installation guidance.
Fixed
- Codegen regressions: Fixed recent LLVM IR generation regressions and related import handling issues.
- Website behavior: Corrected landing page rendering details, including list key usage and stack example behavior.
- Build and CI support scripts: Fixed tooling and script issues affecting local and CI workflows.
- Versioning release prep: Synced release metadata and version-related files for
0.2.1.
Security
- Dependency and vulnerability updates: Applied dependency maintenance and vulnerability fixes, including Dependabot-driven updates.
- Static analysis cleanup: Addressed SonarCloud findings and code quality issues across the codebase.
v0.2.0
v0.1.2
Bug fixes for chaining stuff, function returns, switch/match statements, and references.