Skip to content

Releases: Rock-lang-org/Rock

Rock v0.7.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 11:02
Immutable release. Only release title and notes can be modified.
0a4a963

Rock v0.7.0

Rock v0.7.0 brings Unicode-aware strings, generalized iteration, default generic type arguments, explicit integer arithmetic policies, and a reorganized standard library named std.

Changelog

Language and Standard Library

  • UTF-8 strings: Char is a 32-bit Unicode scalar value. Strings support validated byte conversion with String::from_utf8, checked byte-range slicing at UTF-8 boundaries, scalar lookup, and borrowing chars! and char_indices! cursors. String lengths and search offsets still count bytes; embedded NUL bytes are preserved by Rock string operations.
  • Generalized iteration: for..in and for_each use short-circuiting Foldable and FoldableValue protocols, including custom foldable types and character cursors. break stops traversal immediately.
  • Default generic types: structs, enums, traits, and type aliases accept defaults such as struct Pair A, {B = A}. Defaults resolve in declaration scope, may refer to earlier parameters, and are applied only after ordinary construction inference has had its chance.
  • Equality and ordering: PartialEq {Rhs = Self} supports same-type and directional cross-type equality, including String/&Str comparisons. PartialOrd, Eq, and Ord distinguish partial from total comparison; floating-point comparisons preserve NaN behavior.
  • Explicit integer arithmetic: the Integer trait supplies checked_*, wrapping_*, saturating_*, and overflowing_* operations. Ordinary integer arithmetic uses the policy compiled into its std implementation: checked in debug builds and wrapping in release builds. Division by zero and signed minimum divided or remaindered by -1 always fail.
  • Library-owned primitives: arithmetic, comparisons, indexing, pointer access, and sequence helpers are implemented through explicit intrinsics in std rather than compiler fallbacks. Arrays and slices expose len!, is_empty!, as_ptr!, and as_mut_ptr!; memory helpers include sizeof and sizeof_pointee.
  • Organized std modules: public APIs are grouped under std::mem, std::cmp, std::num, std::ops, std::functional, std::collections, std::string, std::control, std::io, std::concurrency, and std::ffi, with the everyday vocabulary available through the prelude.
struct Pair A, {B = A}
    < first: A
    < second: B

main = !->
    pair: Pair I64 = Pair
        first: 20
        second: 22
    (pair.first + pair.second).println!
    for ch in "Rock 🦀".chars!
        ch.println!

This prints 42, followed by each Unicode scalar in Rock 🦀 on its own line.

Tooling

  • Build profiles: rock build, rock run, rock artifact, and rockc accept --debug and --release instead of -O. Project outputs and dependency caches are separated into build/debug/ and build/release/.
  • Project cleanup: rock clean removes the current project's build output and dependency cache without touching source files or the installed std.
  • Build feedback: live progress reports compilation work and cache reuse.
  • Compiler control: rockc --overflow-checks true|false selects integer overflow policy independently of optimization when building source; it does not change a prebuilt dependency's policy.
  • Documentation: refreshed README and book examples cover Unicode strings, iteration, generic defaults, standard-library modules, and the current project workflow.

Fixes

  • Fixed optimized unit-returning main functions so successful effect-only programs return exit status zero.
  • Corrected loan tracking through aggregate returns, mixed explicit and tail returns, and raw-pointer returns and reborrows, including calls through prebuilt dependency artifacts.
  • Fixed mutually recursive and cross-module generic defaults, declaration-order handling, and static-method default instantiation.
  • Improved constant integer arithmetic diagnostics and transitive arithmetic summaries carried by dependency artifacts.
  • Improved compilation and regression-test performance, and fixed a concurrent release-test panic.

Migration from v0.6.0

  • Replace stdlib::... imports with the corresponding std::... paths and update old flat modules to the new public facades, for example std::collections::Vec, std::mem::Box, std::io::fs::File, and std::io::net::TcpStream. Old crate and module names are not retained as aliases.
  • Source-build and artifact workflows now use std/, std.rkca, std.o, --extern-artifact std=..., and rockup dev std package.
  • Replace -O options with --debug or --release; update scripts that read the former unprofiled build paths.
  • Custom foldable implementations must provide the new short-circuiting try_fold contract; foldl has a default implementation.
  • Use PartialEq and PartialOrd for partial comparisons, particularly floats; implement Eq or Ord only when their stronger promises hold.
  • Review FFI and raw-storage assumptions about Char: it now represents a 32-bit Unicode scalar rather than a byte. Use U8 for raw bytes, and validate untrusted UTF-8 with String::from_utf8.
  • Rebuild all dependency artifacts with the matching 0.7.0 compiler and std. Artifact format 50 is not compatible with earlier formats; keep compiler binaries, std, objects, artifacts, and component metadata from the same build.
  • A precompiled std keeps its producer's overflow policy even when an application changes build profiles. Rebuild std to select a different ordinary-arithmetic policy, or use explicit Integer methods for profile-independent behavior.

Install or Update

Linux x86_64 GNU only. Requires glibc 2.39 or newer, a C linker, curl, CA certificates, GNU tar, gzip, and sha256sum. On Ubuntu 24.04, install build-essential curl ca-certificates. LLVM 18 is statically linked; an LLVM installation is not required. The executables are not fully static.

Install the pinned release after publication:

curl --proto '=https' -fsSL https://github.com/Rock-lang-org/Rock/releases/download/v0.7.0/install.sh | sh -s -- v0.7.0

With an existing manager:

rockup self update
rockup install v0.7.0
rockup default v0.7.0
rock --version

Managers older than v0.5.2 may require the repository-transfer recovery procedure.

Rock remains experimental: syntax, APIs, tooling, and artifact formats can change. Unicode APIs operate on scalars and byte boundaries, not grapheme clusters. This release does not add Windows or macOS toolchains.

Full changelog: v0.6.0...v0.7.0

Rock v0.6.0

Choose a tag to compare

@github-actions github-actions released this 26 Sep 10:30

Rock v0.6.0

Rock v0.6.0 adds flat monadic sequencing, expands the functional standard-library APIs, and makes call-result propagation and multiline method chains consistent.

Highlights

  • do notation: sequence Option, Result, and custom carriers using <-, ordinary assignments, and a final expression. The parser expands the block into calls to the bind function in scope.
  • Consistent call boundaries: multiline method chains continue the completed call, and postfix ? propagates a call's result before following operators, methods, indices, casts, or further calls. Explicitly grouped arguments retain their own propagation.
  • Unified conversions: From implementations replace the specialized safe String::from_* constructors; Into provides the corresponding conversions for callers.
  • Functional APIs: expanded callable-trait dispatch, standalone and receiver-based higher-kinded APIs, generic for_each, and unit-returning function shorthand such as (!.println!).
  • Project creation: rock new creates a new application project.
  • Compiler fixes: corrected transitive closure captures, restoration of shadowed bindings, and indentation after multiline call chains.
  • Documentation and tooling: practical functional examples, a README do showcase, and a pinned tree-sitter grammar with do syntax, highlighting, and scope support. Editor integrations and rock_http are maintained in separate repositories.
main = !->
    result = do
        first <- Option::Some 20
        second <- Option::Some 22
        pure first + second
    result.unwrap_or 0 .println!

This prints 42; a None at either bind skips the remaining continuation.

Migration from v0.5.2

  • Replace String::from_str text, String::from_bytes bytes, and String::from_i64 number with String::from text, String::from bytes, and String::from number respectively.
  • do is now a reserved keyword.
  • An ungrouped call's ? now consistently belongs to the call result. When an argument needs its own propagation, place ? inside that argument's parentheses, particularly before another comma-separated argument.
  • Rebuild application dependencies with the matching compiler and standard library; keep the distributed compiler, objects, artifacts, and component metadata together.
  • The book's HTTP tutorial pins an updated rock_http revision compatible with the conversion API. Update older checkouts before using them with v0.6.0.

Install or Update

Linux x86_64 GNU only. Requires glibc 2.39 or newer, a C linker, curl, CA certificates, GNU tar, gzip, and sha256sum. On Ubuntu 24.04, install build-essential curl ca-certificates. LLVM 18 is statically linked; an LLVM installation is not required. The executables are not fully static.

Install the pinned release:

curl --proto '=https' -fsSL https://github.com/Rock-lang-org/Rock/releases/download/v0.6.0/install.sh | sh -s -- v0.6.0

With an existing manager:

rockup self update
rockup install v0.6.0
rockup default v0.6.0
rock --version

Managers older than v0.5.2 may require the repository-transfer recovery procedure.

Rock remains experimental: syntax, APIs, tooling, and artifact formats can change. The standard monadic bind retains its FnMut callback contract and the compiler's existing ownership checks.

Full changelog: v0.5.2...v0.6.0

Rock v0.5.2

Choose a tag to compare

@github-actions github-actions released this 12 Sep 17:05

Rock v0.5.2

Rock now lives at Rock-lang-org/Rock. This release completes the repository transfer for release downloads and the toolchain manager.

Changes

  • Updated rockup, the bootstrap installer, release tooling, documentation, and package metadata to the organization repository.
  • The bootstrap now installs both rockup and the selected complete toolchain automatically.
  • Refreshed the language book and reorganized the Neovim plugin under neovim/.
  • Published the book at https://rock-lang-org.github.io/Rock/.

Install

Linux x86_64 GNU only. Requires glibc 2.39 or newer, a C linker, curl, CA certificates, GNU tar, gzip, and sha256sum. On Ubuntu 24.04, install build-essential curl ca-certificates. LLVM 18 is statically linked; no LLVM installation is required. These are not fully static executables.

The following command executes the release publisher's installer; inspect the attached install.sh first if needed:

curl --proto '=https' -fsSL https://github.com/Rock-lang-org/Rock/releases/latest/download/install.sh | sh

Existing Installations

Managers from before v0.5.2 reject GitHub's new canonical redirect during stable resolution and self-update. Installed toolchains remain usable. To recover without deleting toolchains or pins:

  1. Stop other rockup operations and move only $HOME/.rockup/bin/rockup to an unused backup filename, or use the equivalent path under your custom ROCKUP_HOME.
  2. Rerun the installer above with the same home settings. It intentionally refuses to overwrite an existing manager.
  3. If stable is already installed, the installer reports that the toolchain exists after installing the new manager. Run rockup update stable, then verify rockup --version and rock --version.

Keep the backup until verification succeeds; restore it if manager installation fails. Do not bypass checksum or URL validation. Pinned older releases still contain their original managers.

Rock remains experimental: syntax, APIs, tooling, and artifact formats can change.

Full Changelog: v0.5.1...v0.5.2

Rock v0.5.1

Choose a tag to compare

@github-actions github-actions released this 12 Sep 15:17

Rock v0.5.1

Fixes installed toolchains selecting a compiler checkout's stale standard library instead of their own bundled copy.

Upgrade

rockup update

Then run your project normally, including from inside the Rock repository:

rock run -- listen

No sysroot workaround is needed for the installed stable toolchain. rockup self update also updates the manager to 0.5.1, but the toolchain update is what delivers this fix.

If your project is pinned to v0.5.0, install v0.5.1 and update its rock-toolchain.toml channel to v0.5.1. Updating stable does not change a version pin.

Fixes

  • Installed binaries now resolve stdlib relative to their own toolchain root, not an ancestor project's target/ directory.
  • CARGO_TARGET_DIR applies to development sysroot discovery and no longer redirects an installed toolchain.
  • Installed toolchains no longer compare their stdlib against source files from the compiler's build checkout.
  • Explicit ROCK_SYSROOT and compiler --sysroot overrides retain priority. Leave ROCK_SYSROOT unset for normal rockup-managed use.
  • Added regression coverage for installed toolchains inside a checkout containing stale artifacts, including a CARGO_TARGET_DIR override.

This resolves the artifact freshness mismatch that could report an expected compiler version of 0.5.0 but find a 0.1.0 artifact under the repository's target/ directory. Compiler artifact compatibility checks were not weakened, and checkout artifacts are not deleted or rewritten as a workaround.

Platform

Linux x86_64 GNU, Ubuntu 24.04 / glibc 2.39 or newer. LLVM 18 remains statically linked; binary-release users do not need Rust or LLVM installed. A C linker and standard system libraries are still required.

The release contains matching rock, rockc, rock-lsp, rockup, and stdlib assets with SHA-256 sidecars.

Installation guide | Full changelog

Rock v0.5.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 14:38

Rock v0.5.0

The first release of the rewritten Rock toolchain with rustup-style installation through rockup.

Rock remains experimental. This is a major rewrite since the historical 0.4 series, not a backwards-compatible language or API release.

Install

Supported platform: x86_64 Linux GNU, with Ubuntu 24.04 / glibc 2.39 or newer as the baseline.

On Ubuntu 24.04, install the runtime prerequisites:

sudo apt install build-essential curl ca-certificates

Install the manager from this repository's release assets:

curl --proto '=https' -fsSL https://github.com/Champii/Rock/releases/latest/download/install.sh | sh

Restart your shell, then install the compiler, project command, language server, and matching standard library:

rockup install

Neither Rust nor an LLVM installation is required to use the binary release. LLVM 18 is statically linked into the compiler. These are not fully static executables: normal system libraries and a C linker remain required. GNU tar, gzip, and sha256sum must also be available.

The installer executes code from the release publisher. Download and inspect install.sh first if you prefer. Rockup verifies downloaded binaries and archives using their SHA-256 sidecars; checksums provide integrity, not independent signed provenance.

Highlights

  • Native compilation through LLVM 18, with no shared LLVM dependency for end users.
  • A project-aware rock command for build, run, format, expansion, and artifact workflows.
  • Versioned toolchains, a moving stable channel, project pins, and explicit manager updates through rockup.
  • Type inference, ownership and borrowing, structs, enums, pattern matching, traits, and associated types.
  • Functions as values, currying, call holes, multiline pipelines, and library-defined functional operators.
  • Higher-kinded abstractions including Functor, Applicative, Monad, Foldable, and Traversable.
  • A matching standard library and rock-lsp for editor diagnostics and type information.
  • An expanded README with small, executable examples and a published language book.

Manage Versions

rockup update
rockup self update
rockup list

To select this exact release instead of the moving stable channel:

rockup install v0.5.0
rockup default v0.5.0

Historical release assets before v0.5.0 cannot be installed by this bootstrap. Windows, macOS, musl, and other CPU architectures are not supported release targets yet.

Assets

  • install.sh: manager-only bootstrap; run rockup install afterward.
  • rockup-x86_64-unknown-linux-gnu: standalone toolchain manager.
  • rock-v0.5.0-x86_64-unknown-linux-gnu.tar.gz: complete toolchain with rock, rockc, rock-lsp, stdlib artifacts and sources, and LLVM license notices.
  • stdlib-v0.5.0-x86_64-unknown-linux-gnu.tar.gz: matching target component for artifact-level workflows.
  • Each asset has an accompanying .sha256 file.

Getting started | The Rock Book | Installation guide

Full changelog: v0.4.3...v0.5.0

v0.4.3

Choose a tag to compare

@Champii Champii released this 31 Aug 16:23

What's Changed

Full Changelog: v0.4.2...v0.4.3

v0.4.2

Choose a tag to compare

@Champii Champii released this 26 Jun 04:00
17b44d6

What's Changed

  • Update README to show the right version of llvm

  • Add the self returning method with @->

  • Add an embryo of documentation with mdbook

  • Add \0 as escaped char and generalize escaped char parsing (#125)

  • Escaped chars (#132)

  • Introducing default trait methods (#128)

  • Allow for empty impl

  • Allow for default method overriding

  • Fix dot notation newline (#140)

by restricting newline in dot notation when parsing an argument

  • Struct fields are no more reordered. (#138)

  • Submodule parser errors (#137)

Full Changelog: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@Champii Champii released this 15 Jun 00:05

v0.4.1

What's Changed

  • Add negative integers and float, and empty indented lines by @Champii in #114
  • Add char support
  • Add string indexing support
  • Upgrade to LLVM13

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@Champii Champii released this 09 Jun 18:52
Bump version for release

v0.3.0

Choose a tag to compare

@Champii Champii released this 09 Jun 00:04
v0.3.0