Skip to content

Hyper 0.4.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 09 Sep 09:34
· 113 commits to main since this release

Summary

Language and toolchain improvements: richer builtins on the compile path, first-class native support across major OSes, faster collections and integers, stricter compile-time checks, and a fuller language reference.

Hyper remains compiler-only: hyper run / hyper compile use the Cranelift JIT; --emit-exe / --emit-obj remain available for ahead-of-time artifacts.

Highlights

  • Builtins on the compile path — Numerics, conversions, sequence helpers, and related everyday helpers (JIT and AOT C runtime).
  • Cross-platform as a first-class target — Linux, macOS, and native Windows build and run the same smoke paths in CI. AOT linking works with host toolchains (including MSVC on Windows). Memory-mapped files (open_mmap) work on Windows as well as Unix. WSL is optional, not required.
  • Faster dicts — Compile-path dictionaries use hash-based get/set (open addressing in the AOT C runtime) while keeping insertion order for print / keys().
  • Fixed-width integers — Clearer tracking and handling for width-sensitive integer ops, including unsigned 64-bit support on the compile path.
  • Safer compile-time diagnostics — Literal division/modulo by zero and related hard errors are rejected at compile time (exit 65). Unknown methods on known types and stricter builtin arity checks fail early. Dynamic zero-division still raises RuntimeError at run time (exit 70).
  • Runtime robustness — Stronger ownership tracking for heap strings (including f-string / concat paths) so temporary strings are less likely to leak under the compiler runtimes.
  • Documentation — Expanded language reference covering variables, control flow, types, collections, I/O, modules, structs/traits, and more — aligned with runnable examples.

Notes

  • @parallel / @vectorize still compile to sequential loops with the same per-index results; threaded / SIMD codegen remains future work.
  • Generics and full stdlib parity are not claimed in this release.
cargo build --release
hyper run your_program.hyp
# or
hyper compile your_program.hyp --emit-exe out