Skip to content

v0.2.0

Latest

Choose a tag to compare

@elbayoumi elbayoumi released this 06 Dec 02:20
· 18 commits to main since this release
ce09b29

midad 0.2.0. Two things a program could not rely on are fixed, and one change breaks 0.1.x code on purpose.

  • midad run has a budget now. A program that does not serve stops after 120 seconds or 10 billion steps, whichever comes first, and the refusal names the limit and the flag that lifts it (--no-limit). A program that serves is exempt, because it is meant to keep running, and a request keeps its own 50M-step and 2-second budget.
  • Breaking: push, set_at and sort change their first argument and answer nothing, so xs = push(xs, 1) is a compile error (E0260); remove_at(l, i) answers the element it removed. The old form made a bare push(l, 1); a silent no-op. A 0.1.x program needs the assignment dropped and the statement kept.
  • null is a value of its own again, not the empty option: type_of(null) is null, is_null(null) is true, and None is the empty option. Cranelift refuses null by name for now.
  • midad new writes a project midad check . accepts; midad ast big.md | head no longer panics; midad spec prints the signature and the version the code has, including respond's third parameter.
  • The C backend compiles a typed local that takes a map value, so a group-by over a map compiles at all.

Measured here on one vCPU, medians of three, the new db workload (a group-by over 200,000 records): interpreter 269 ms, Cranelift 22 ms, C 13 ms, Rust 14 ms, Go 10 ms, Node 37 ms. midad loses to Go on this shape, and BENCHMARKS.md says so.

Known limits: a native program has neither a step budget nor a deadline, and there is no whole-heap budget. docs/LIMITS.md lists the rest.

Install: cargo install midad (crates.io has 0.2.0), or take the archive for your platform below, unpack it, and put midad on your PATH. Each archive has a .sha256 next to it.

Full notes: https://github.com/mdexec/midad/blob/main/CHANGELOG.md