Skip to content

Hyper 0.3.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 04 Sep 11:43
· 198 commits to main since this release

Compiler-only

Breaking release. Hyper is now a compiled-only language. The tree-walk interpreter is gone: every program runs through Cranelift JIT or native AOT (--emit-exe).

This follows v0.2.0 (memory safety + performance, dual backend still present). Use v0.2.0 if you still need the interpreter; use v0.3.0 for the permanent compiler-only toolchain.


Summary

Before (≤ 0.2.0) After (0.3.0)
hyper run → interpreter hyper run → Cranelift JIT
hyper compile → JIT hyper compile → JIT (unchanged)
run --interpret / HYPER_BACKEND=interpret Removed
hyper evaluate Removed
Interpreter @parallel threads No interpreter threads; @parallel stays sequential on the compile path

Breaking changes

  • No tree-walk interpretersrc/interpreter.rs deleted.
  • hyper run is JIT — same engine as hyper compile.
  • Type errors are fatal on run — same as compile (no soft “warning and continue”).
  • Removed CLI / env:
    • hyper evaluate
    • hyper run --interpret
    • HYPER_BACKEND=interpret / interpreter
  • Removed modules: src/text_utils.rs, src/collection_utils.rs (string/collection methods already live on the compile runtime).
  • @parallel: no interpreter thread pool. Compile path remains sequential until threaded codegen lands.

What still works

  • hyper run file.hyp — JIT execute
  • hyper compile file.hyp — JIT execute
  • hyper compile file.hyp --emit-ir
  • hyper compile file.hyp --emit-obj [path]
  • hyper compile file.hyp --emit-exe [path]
  • hyper typecheck file.hyp
  • hyper tokenize / hyper parse

Core language, I/O, JSON, strings, collections, raise / handle, traits, pub / mut, and modules continue on the compile path (JIT and --emit-exe).

String methods:

  • JIT: compiler/runtime/str.rs
  • AOT: compiler/runtime/hyper_rt_str.c

environment.rs still defines HyperValue for the JSON bridge only — it is not an execution backend.


Migration from v0.2.0

Run a program

# before (0.2.0)
hyper run --interpret app.hyp
# or
HYPER_BACKEND=interpret hyper run app.hyp

# after (0.3.0)
hyper run app.hyp
# same engine:
hyper compile app.hyp

Scratch / one-off expression

# before
hyper evaluate expr.hyp

# after — use a tiny program
print(1 + 2)
# then:
hyper run scratch.hyp

Parallel loops

# 0.2.0: real threads only on interpreter run
hyper run --interpret parallel.hyp

# 0.3.0: @parallel is sequential on JIT/AOT (same per-index results)
hyper run parallel.hyp
hyper compile parallel.hyp --emit-exe app

Try it

git checkout v0.3.0
cargo build --release

./target/release/hyper run ci/smoke.hyp
./target/release/hyper compile ci/smoke.hyp
./target/release/hyper compile ci/smoke.hyp --emit-exe /tmp/hyper_smoke
/tmp/hyper_smoke

run and compile should print the same output for supported programs.


Removed / Changed (changelog)

Removed

  • src/interpreter.rs, src/text_utils.rs, src/collection_utils.rs
  • hyper evaluate
  • hyper run --interpret / HYPER_BACKEND=interpret

Changed

  • hyper run always uses Cranelift JIT (same engine as hyper compile)
  • Type errors are fatal on run (same as compile)
  • Docs, CI, and issue templates describe a single compiled execution model
  • environment.rs keeps HyperValue only as the JSON bridge host type

Known limitations (unchanged direction)

  • Threaded @parallel / SIMD-GPU @vectorize codegen still future work
  • Generics / full trait system
  • Full Python / stdlib / NumPy parity

See doc/compiler/known-limitations.md.


Links

Title suggestion: v0.3.0 — Compiler-only Hyper