You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Includes tools/docs-indexer/ for re-indexing and tools/retrieval-test/ eval harness (8/8 retrieval, 19/19 error-explainer). Full runbook in workers/mux-ai/README.md.
to_char() conversion method: Implemented string.to_char() -> result<char, string> and int.to_char() -> char (Unicode code-point to char). Closes #207.
to_list() on set and map: set<T>.to_list() and map<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> and map<K,V> instead of raw brace-syntax ({char}, {string: int}). Closes #210.
Improved error for .new() on built-in collections: Calling list.new(), map.new(), or set.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
void functions require explicit return: Functions declared returns void without a return statement now produce a compile-time error instead of silently compiling. Closes #211.
Map {} literal compiled as Set: map<K,V> m = {} previously produced a Value::Set at runtime, causing segfaults on map operations. Fixed by resolving {} type contextually during semantic analysis (SetOrMapLiteral) so codegen emits mux_new_map vs mux_new_set correctly.
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-initialized list/map/set fields 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_overrides from submodules are also merged so empty {} literals are correctly disambiguated. Closes #203.
Type::Module panic: resolve_type_with_seen() and llvm_type_from_resolved_type() panicked on Type::Module instead of returning Err, breaking module.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.