Skip to content

Releases: cardillan/mindcode

3.16.3

02 Jun 14:55

Choose a tag to compare

3.16.3 – 2026-06-02

Fixed

  • Fixed an internal error when using a built-in variable as an array index (#316).
  • Fixed a case statement with an expression causing an internal error (#318).
  • Fixed a procesor emulator error in handling the setrate instruction, rendering it ineffective.

Added

Changed

  • Breaking: the enforce-instruction-limit option has been renamed to enforce-size-limits.
  • Changed the web app to use the new MlogWatcher API.
  • Changed the Expression Optimization to handle integer division by one the same as the op floor instruction.
  • Changed the mlog parser to raise an error when the code contains duplicate labels, regardless of the processor version. This behavior matches the latest Mindustry version; in older Mindustry versions the code is still accepted.
  • Changed the Expression Optimization and Array Optimization to remove an op floor instruction when applied to the array index.
  • Changed the Expression Optimization: when the op round instruction is available, a sequence of op add and op floor instructions (as in floor(x + 0.5)) is replaced with the op round instruction (as in round(x)).
  • The variable reference index is recreated before each optimization, potentially allowing more optimizations to be performed.

3.16.2

25 Apr 08:04

Choose a tag to compare

3.16.2 – 2026-04-25

Fixed

  • Fixed incorrect decompilation of a read instruction reading a character value from a constant string in Mlog Decompiler.

Added

  • Added support for the new bullet instruction and for the new sensable/settable properties (@pingX, @pingY, @pingText, @bulletLifetime and @bulletTime).
  • Added support for the new query instruction and the @queries built-in array.

Changed

  • The default compiler target is now 8m.

3.16.1

12 Apr 17:52

Choose a tag to compare

3.16.1 – 2026-04-12

Fixed

  • Fixed incorrect Condition Optimization (#307).

Added

  • Added a limit on the maximum length of mlog string literals (65,535 bytes in UTF-8 encoding). String literals larger than this limit cause compilation errors.
  • Added a limit on the maximum generated mlog code size (102,400 bytes in UTF-8 encoding). When the generated or loaded mlog code exceeds this limit, an error or warning is generated, depending on the value of the enforce-instruction-limit compiler option.
  • Added support for the new setrule pauseDisabled instruction.

Changed

  • The new version of the Mlog Watcher mod is now used by default by the tool app.
  • Updated the Mindustry metadata to the latest version, adding the new @large-canvas block.

3.16.0

06 Mar 17:09

Choose a tag to compare

3.16.0 – 2026-03-06

Changed

  • The target attribute specified in a Schemacode definition file now expects only the version number (e.g., target = 8.0). The processor type cannot be specified using the target attribute, but is inferred from the block type in the schematic.
  • The web application has been completely overhauled. The highlights of the new web app are:
    • Modern, mobile-friendly design.
    • The compilation happens without page refresh, meaning the edit history of the code is not lost on compilation. It is also possible to undo (Ctrl-Z) the action of loading an example code or clearing the editor.
    • Syntax highlighting in the source code editor. All syntaxes (Mindcode including mlog blocks, Schemacode) are supported.
    • Code folding in all source code editors.
    • Indicating syntax errors from the last compilation directly in the editor.
    • Support for running schematics and generic mlog code on the built-in processor emulator.

3.15.1

28 Feb 21:03

Choose a tag to compare

3.15.1 – 2026-02-28

Fixed

  • Fixed compiler crashing when an unsupported combination of a processor version and a processor type is specified (e.g., #set target = 6;).
  • Fixed wrong handling of linked blocks by the DFO (#303).
  • Fixed Boolean Optimization bugs (#304):
    • The optimization may crash when compiling for targets 8.0 and lower.
    • The optimization incorrectly processes some noninteger values.

3.15.0

22 Feb 21:00

Choose a tag to compare

3.15.0 – 2026-02-22

Note

Atomic code sections are only guaranteed to execute correctly in Minddustry build 155 Beta or later.

Note

The new Mlog Watcher functionality available with the tool app requires a new version of the Mlog Watcher mod. The new version has not yet been released, but a Mindustry 8-compatible binary is available here. To use that version, the --watcher-version v1 command line argument must be specified.

Fixed

  • Fixed a possible error in the tool app handling command-line parameters (#302).

Added

  • Breaking: the loop keyword has been reintroduced, to create infinite loops. Code that uses loop as a function or variable name will not compile, and the variable or function will have to be renamed.
  • Added the possibility to use the break statement to exit code blocks.
  • Added implicit labels to loops and code blocks.

Changed

  • Breaking: Changed the meaning of the target compiler option: when no processor type is specified, the compiler generates the code for a non-processor context. Privileged instructions are supported, but atomic sections and waits aren't.

3.14.0

08 Feb 11:44

Choose a tag to compare

3.14.0 – 2026-02-08

Note

Atomic code execution are only guaranteed to execute correctly in the latest BE version (build 26658 or later). The latest beta release (v154.3) doesn't provide necessary support for atomic code execution.

Note

The new Mlog Watcher functionality available with the tool app requires a new version of the Mlog Watcher mod. The new version has not yet been released, but a Mindustry 8-compatible build is available here. To use that version, the --watcher-version v1 command line argument must be specified.

Fixed

  • Fixed an internal error when compiling a function in the main program declared as export.
  • Fixed incorrect Temp variable elimination (#298).
  • Fixed a possible internal error when parsing a syntactically incorrect file.
  • Fixed incorrect handling of some privileged instructions by the Print Merging optimization (#300).
  • Fixed incorrect handling of function calls in short-circuit expressions by the Data Flow Optimization (#301).

Added

  • Added the atomic() intrinsic function and atomic function modifier.
  • Added support for nested atomic sections and atomic function calls from an atomic section. The entire topmost atomic section is executed atomically.
  • Added support atomic section merging. The duration limit of a merged section can be specified using the atomic-merge-level compiler option (one tick by default).
  • Added a atomic-safety-margin compiler option. No safety margin is necessary with the latest Mindustry BE build, though.
  • Added new tool app functionalities:
    • Support for the new version of Mlog Watcher mod, providing several useful new ways to send or extract mlog code and schematics to/from a running game. To use the new Mlog Watcher mod, the --watcher-version v1 command-line argument needs to be specified.
    • Ability to execute mlog code loaded from a file on the processor emulator and for sending it to the Mlog Watcher. Use the new pm or process-mlog command-line argument.
    • Ability to execute schematics loaded from a file on the processor emulator and for sending it to the new version of the Mlog Watcher. Use the new ps or process-schematic command-line argument.
  • Added a validation step to the compiler to verify the generated code doesn't exceed the maximum number of instructions. The enforce-instruction-limit compiler option can be used to control this behavior.

Changed

  • When an atomic section doesn't contain any protected instruction, the wait instruction providing the atomicity of the section is not generated.
  • The setrate instruction is no longer allowed in atomic sections.
  • The volatile-atomic compiler option has been renamed to atomic-full-protection, with inverted meaning.
  • Changed Mindcode syntax to allow specifying multiple function modifiers in arbitrary order. For example, it is now possible to declare a function as inline debug as well as debug inline (which was the only allower order previously).
  • Compiler and optimizer messages are no longer output on the console in the command-line application. To access these messages, a log file needs to be generated.
  • Console output is generated on the fly, instead of being cached and dumped all at once when the processing is finished.

Deprecated

  • The dm (decompile mlog) and ds (decompile schematic) command-line arguments are deprecated. Use pm and ps instead ("p" stands for "process" as the command-line tool now allows more actions to be performed in addition to decompilation, such as running it on the internal emulator).
  • The Schematics Refresher mod is deprecated and will be no longer maintained. The Mlog Watcher mod will provide better functionality for managing schematics in the game.

3.13.0

18 Jan 20:22

Choose a tag to compare

3.13.0 – 2026-01-18

Note

The atomic code blocks are only guaranteed to execute correctly in the latest BE version (build 26609 or higher). The latest beta release (v154.3) doesn't provide necessary support for atomic code blocks.

Fixed

  • Fixed incorrect emulation of the instruction accumulator for targets 6 and 7 affecting instruction scheduling.

Added

  • Added new @maxUnits sensable property.
  • Added an atomic code block: a block of code guaranteed to be executed atomically (without interruption), meaning that other processors or game updates do not change the world state.
  • Added the setrate and ipt compiler options. These options specify the rate at which a world processor executes instructions (used by the compiler when building atomic blocks).
  • Added the volatile-atomic compiler option governing the way atomic blocks are created.
  • Added the processor-id, program-name and program-version compiler options. These options take string values, which are then encoded into a *id variable and can be used to identify the processor in the schematics.
  • Added the emulator-fps compiler options to specify the frame rate to be emulated by the processor emulator. While frames are always emulated fully by Mindcode emulator, the change in instruction scheduling caused by different frame rate only affects situations where an interaction between two or more processors is being emulated.
  • Added the ability to run the compiled schematics on the schematics emulator to the tool app.
  • Added support for sensing @x and @y in blocks when emulating schematics.
  • Added the encode-zero-characters compiler option, which allows encoding zero characters in string literals. Use with caution: resulting code cannot be edited or passed via clipboard. Option has no effect in the web app.

Changed

  • Runtime errors generated when running the code in the processor emulator no longer prevent outputting the compiled code in the tool app.
  • Changed the format of the target compiler option. Instead of a processor edition (standard or world), a particular processor type is now specified, using the first letter of the type name (i.e., m for micro-, l for logic-, h for hyper-, and w for world-processor, case-insensitive), for example, #set target = 8L;.
  • When compiling Mindcode for a processor in a schematic, the target type of the processor is determined by the block type in the schematic.
  • Compiler-defined constants now follow the @@VARIABLE pattern, instead of earlier __VARIABLE__ (for example, @@MINDUSTRY_VERSION).
  • Changed the emulator handling of the wait instruction with zero argument to match the latest Mindustry BE behavior.

Miscellaneous

  • The system of compiler options has been updated to allow determining whether a given option has been set. This allows the default values of unset options to be derived from the values of other options.
  • The transfer variable, defined for uncached external and remote variables, is no longer used for reads. Instead, a fresh new temporary variable is used each time. This may increase the number of temporary variables generated but avoids unnecessary instructions when using postfix operators on these variables. This became quite important with atomic blocks.

3.12.1

12 Jan 21:34

Choose a tag to compare

3.12.1 - 2026-01-12

Fixed

  • Fixed the Data Flow optimization incorrectly marking a variable as uninitialized (#296).

3.12.0

11 Jan 13:45

Choose a tag to compare

3.12.0 - 2026-01-11

Fixed

  • Fixed incorrect evaluation of some numeric mlog constants (#295).
  • Fixed the Mandelbrot schematic sample not rendering after build.

Changed

  • The Loop Rotation optimization has been updated:
    • Full loop rotation is performed even for conditions which contain complex code (such as nested loops or function calls).
    • A full loop rotation is also considered alongside a partial rotation if it could be beneficial to Loop Hoisting.
  • The Loop Hoisting optimization has been extended:
    • The optimizer gathers information to support the Loop Rotation optimization.
    • When a loop is fully rotated, an instruction can be hoisted in such a way that it's executed at most once, but only if the loop actually runs.
    • When a loop is not known to execute at least once, an instruction affecting just the loop can still get hoisted entirely out of the loop if the loop is nested.
  • The mlog processor emulator has been completely rewritten. The emulator now matches the behavior if a Mindustry processor of the version identified by the target (or emulator-target compiler options.
  • The execution flags have been updated to match the new processor emulator. Some flags have been removed, some have been added, and some have been renamed.
  • The processor emulator is now able to execute supported instructions even when created using an mlog() fuction or an mlog block. This includes the code generated by the compatibility library.