Skip to content

Releases: hyperlangg/hyper

Hyper 0.5.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 14 Sep 10:05

Summary

Compiler-only, AOT-only. Everyday hyper run and hyper compile no longer use a JIT. The default path is Hyper IR → LLVM IR → clang and the C runtime. Cranelift remains the fast object path (--emit-obj) and an opt-in AOT backend (--backend cranelift / HYPER_CODEGEN=cranelift).

Breaking

  • No JIT. run and compile build a temporary executable and run it. There is no interpreter and no Cranelift JIT.
  • clang is required for the default LLVM path. If it is missing, use --backend cranelift.
  • --emit-obj is always Cranelift, even when the selected backend is LLVM.
  • --emit-llvm writes a .ll file and does not link an executable.

Added

  • Threaded @parallel. Outlineable for range loops (induction variable and callees only) run on an OS thread pool. Bodies that capture or mutate outer locals stay sequential, with the same per-index results. break and continue inside a @parallel body are rejected.
  • Struct field checks at compile time: existence, mutability, and types when the receiver’s struct type is known. Type errors are fatal before codegen (exit 65).
  • Shared ref for list, dict, and array payloads. Mutations through an alias are visible to every name that holds the same value. Overwriting a slot does not free a nested list or dict that another name still holds.
  • Unicode-aware case transforms on the AOT path (upper, lower, capitalize, title, swapcase, and the case predicates) for ASCII, Latin-1, Latin Extended-A, Cyrillic, Greek, and the ß / İ / ı expansions. This is not a full Unicode case-folding database.
  • repr for lists and dicts prints the value instead of <?>.
  • Empty {} is an empty dict. [] stays an empty list. {1, 2} (no colon) is unchanged.

Fixed

  • Windows C-runtime builds no longer flood _CRT_SECURE_WARNINGS.
  • Literal division, modulo, and divmod by zero are rejected at compile time. A zero divisor that is not a literal still raises RuntimeError (exit 70).

Notes

  • @vectorize is still sequential. Same per-index results as a plain for. SIMD and GPU codegen are not in this release.
  • Generics and full Python / stdlib parity are not claimed.
  • Open good-first issues are follow-up work. They are not part of 0.5.0.

Hyper 0.4.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 09 Sep 09:34

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

Hyper 0.3.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 04 Sep 11:43

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

Hyper 0.2.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 04 Sep 11:08

Summary

Hyper 0.2.0 hardens memory handling and speeds up hot paths while keeping the dual backend (run interpreter + compile JIT/AOT).

Highlights

  • Safer file close and value overwrite (fewer leaks)
  • Shared list/dict/array references on the interpreter
  • Faster loops / strings on interpret; leaner compile-path codegen for numeric locals and dict/f-string work

Install / try

git checkout v0.2.0
cargo build --release
./target/release/hyper run your.hyp
./target/release/hyper compile your.hyp

Breaking

None intended vs 0.1.0 language surface. Behavior change: collections may share under ref / assignment where they previously copied.

Full notes

See CHANGELOG.md → Hyper 0.2.0

Hyper 0.1.0

Choose a tag to compare

@muhammadyusufpov muhammadyusufpov released this 04 Sep 00:46

First public release

Python-shaped syntax with a Cranelift compiler (hyper compile) and a transitional interpreter (hyper run).

Highlights

  • Core language: functions, structs, modules, control flow, collections, f-strings
  • pub / mut, traits (name + arity), ref, break / continue
  • Explicit errors: raise / raises / handle (no try / except)
  • Compile path: I/O, JSON, mmap, input, clock, string & collection methods
  • JIT and --emit-exe

Install

Build from source (Rust stable):

git clone https://github.com/muhammadyusufpov/hyper.git
cd hyper
git checkout v0.1.0
cargo build --release

Docs

Not in 0.1.0

Generics, shared list/dict ref, threaded compile-path @parallel, SIMD/GPU @vectorize, full Python/NumPy parity.