Releases: EdwardJoke/m4
v0.2.2-rc1
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[v0.2.2-rc1] - 2026-06-02
Added
-h/--helpflag — shows CLI help (was missing, now works everywhere) (M1)lint -stdin support — pipe source directly to type-checker:echo 'let x = 1' | m4 lint -(M1)use fsmodule — file system operations:fs.read(path),fs.write(path, data),fs.exists(path),fs.delete(path)(S1)use strmodule — string utilities:str.len(s),str.slice(s, start, end)(C1)skills/m4-coder/SKILL.md— AI agent reference for writing correct m4 code (M5)- Error codes
r012(Division by Zero) andr013(Modulo by Zero)
Fixed
- Zig stack traces suppressed in CLI error output — users now see clean messages instead of internal file:line traces (M1)
- Division by zero returns
Runtime error [r012]: division by zeroinstead of crashing with Zig panic (M1) - Modulo by zero returns
Runtime error [r013]: modulo by zeroinstead of crashing with Zig panic (M1) fsReadnow validatesftellreturn value before casting tousize— prevents crash on unseekable files
Changed
m4 explainexits cleanly without stack trace when called with no error code (M1)- CLI help:
--targetflag deduplicated (was-target, --target), build flags integrated into flags section (C2) ROADMAP.mdremoved — self-hosting compiler plan condensed into AGENTS.md "Future Roadmap" section (M3)- AGENTS.md, README, build.zig.zon bumped to v0.2.2-rc1 (M2)
- SPEC.md bumped to Draft v0.2.2, module list updated with
strentry - README synced with current CLI help output and stdlib module list (wsp-sync)
Removed
- ROADMAP.md — 312-line standalone file, key content absorbed into AGENTS.md (M3)
Generated by Relote
Full Changelog: v0.2.1...v0.2.2-rc1
v0.2.1
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[v0.2.1] - 2026-06-01
Added
lintsubcommand replacing--checkflag —m4 lint <file.m4>parses and type-checks without execution (M1)m4 <command> help [--zon|--json|--yaml]pattern for command-specific help on all subcommands (lint, build, explain, version)
Changed
- O(1) variable resolution in compiler via
Localswrapper (ArrayList + StringHashMap), replacing O(n) linear scans in ident and assign-target lookups - QBE emitter
fmt()now writes directly to output buffer instead of allocating and freeing an intermediate string per line - QBE string collection uses
getOrPut()single hash lookup instead ofcontains()+put()double lookup
Fixed
m4 build --targetcross-compilation now correctly passes target architecture to assembler (-arch) and compiler/linker (-targettriple). arm64_apple ↔ amd64_apple cross-compilation verified.- Native compilation on non-macOS platforms restored — assembler step falls back to plain
aswithout-archfor native non-Apple targets buildSubcommandHelpInforeturns empty subcommands list for unrecognized names instead of silently returning full help
Removed
--checkglobal flag — replaced bylintsubcommand
Generated by Relote
Full Changelog: v0.1.2...v0.2.1
v0.2.0-rc2
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[v0.2.0-rc2] - 2026-05-30
Added
m4 helpsubcommand with structured output support (--zon,--json,--yaml)m4 versionsubcommand with structured output support (--zon,--json,--yaml)src/cli_info.zig— serializable CLI metadata types (FlagInfo,SubcommandInfo,
UsageMode,HelpInfo,VersionInfo) for structured help/version outputbuildHelpInfo()generates full CLI metadata (subcommands, flags, usage modes)runHelp()andrunVersion()handlers for subcommand execution
Changed
--help/-hand--version/-vflags replaced bym4 helpandm4 version
subcommands with optional structured output formatting- Help text reorganized with explicit Commands section listing all subcommands
(help, version, build, explain) and their flags - REPL welcome text shortened to
:h help, :q quit
Removed
-h,--helpflag — usem4 helpinstead-v,--versionflag — usem4 versioninstead
Generated by Relote
Full Changelog: v0.1.2...v0.2.0-rc2
v0.1.2
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[v0.1.2] - 2026-05-26
Added
- Benchmark suite for measuring compiler and VM performance
asynclanguage feature support- Error codes explainer with AI-friendly output formats
Changed
- Renamed language from "maple" to "m4" with corresponding
.m4file extension - Updated
build.zig.zondependency fingerprint for the renamed package - Compiler optimizations for faster compilation times
Generated by Relote
Full Changelog: v0.1.1...v0.1.2
v0.1.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[v0.1.0] - 2026-05-24
Added
- Core language types: tokens, AST, runtime values (nil, bool, int, float, string,
fn, vec, char), heap objects, bytecode opcodes, and type system - Hand-written scanner with indentation tracking and recursive-descent Pratt parser
with structured error collection (text + DiagnosticList) - Single-pass bytecode compiler, type checker with scope chain environments, and
register-based VM with call frames and native function dispatch - Standard library with
print/printlnnative functions - AST pretty-printer for canonical formatting
- Bytecode disassembler for debugging
- Structured error module with multi-format output (ZON, JSON, YAML)
- CLI entry point with REPL, source file execution, pipeline orchestration,
--debug,--check,--format, and--error-formatflags - Module root re-exporting all public declarations for library consumers
Chores
- Project scaffolding with
build.zig, Zig 0.16.0 minimum, and serde dependency
Generated by Relote