Repository navigation
Releases: Rock-lang-org/Rock
Release list
Rock v0.7.0
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:
Charis a 32-bit Unicode scalar value. Strings support validated byte conversion withString::from_utf8, checked byte-range slicing at UTF-8 boundaries, scalar lookup, and borrowingchars!andchar_indices!cursors. String lengths and search offsets still count bytes; embedded NUL bytes are preserved by Rock string operations. - Generalized iteration:
for..inandfor_eachuse short-circuitingFoldableandFoldableValueprotocols, including custom foldable types and character cursors.breakstops 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, includingString/&Strcomparisons.PartialOrd,Eq, andOrddistinguish partial from total comparison; floating-point comparisons preserve NaN behavior. - Explicit integer arithmetic: the
Integertrait supplieschecked_*,wrapping_*,saturating_*, andoverflowing_*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-1always 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!, andas_mut_ptr!; memory helpers includesizeofandsizeof_pointee. - Organized
stdmodules: public APIs are grouped understd::mem,std::cmp,std::num,std::ops,std::functional,std::collections,std::string,std::control,std::io,std::concurrency, andstd::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, androckcaccept--debugand--releaseinstead of-O. Project outputs and dependency caches are separated intobuild/debug/andbuild/release/. - Project cleanup:
rock cleanremoves 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|falseselects 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
mainfunctions 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 correspondingstd::...paths and update old flat modules to the new public facades, for examplestd::collections::Vec,std::mem::Box,std::io::fs::File, andstd::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=..., androckup dev std package. - Replace
-Ooptions with--debugor--release; update scripts that read the former unprofiled build paths. - Custom foldable implementations must provide the new short-circuiting
try_foldcontract;foldlhas a default implementation. - Use
PartialEqandPartialOrdfor partial comparisons, particularly floats; implementEqorOrdonly 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. UseU8for raw bytes, and validate untrusted UTF-8 withString::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
Integermethods 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.0With an existing manager:
rockup self update
rockup install v0.7.0
rockup default v0.7.0
rock --versionManagers 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
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
donotation: sequenceOption,Result, and custom carriers using<-, ordinary assignments, and a final expression. The parser expands the block into calls to thebindfunction 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:
Fromimplementations replace the specialized safeString::from_*constructors;Intoprovides 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 newcreates 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
doshowcase, and a pinned tree-sitter grammar withdosyntax, highlighting, and scope support. Editor integrations androck_httpare 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, andString::from_i64 numberwithString::from text,String::from bytes, andString::from numberrespectively. dois 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_httprevision 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.0With an existing manager:
rockup self update
rockup install v0.6.0
rockup default v0.6.0
rock --versionManagers 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
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 | shExisting 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:
- Stop other rockup operations and move only
$HOME/.rockup/bin/rockupto an unused backup filename, or use the equivalent path under your customROCKUP_HOME. - Rerun the installer above with the same home settings. It intentionally refuses to overwrite an existing manager.
- If stable is already installed, the installer reports that the toolchain exists after installing the new manager. Run
rockup update stable, then verifyrockup --versionandrock --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
Rock v0.5.1
Fixes installed toolchains selecting a compiler checkout's stale standard library instead of their own bundled copy.
Upgrade
rockup updateThen run your project normally, including from inside the Rock repository:
rock run -- listenNo 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_DIRapplies 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_SYSROOTand compiler--sysrootoverrides retain priority. LeaveROCK_SYSROOTunset for normal rockup-managed use. - Added regression coverage for installed toolchains inside a checkout containing stale artifacts, including a
CARGO_TARGET_DIRoverride.
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.
Rock v0.5.0
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-certificatesInstall the manager from this repository's release assets:
curl --proto '=https' -fsSL https://github.com/Champii/Rock/releases/latest/download/install.sh | shRestart your shell, then install the compiler, project command, language server, and matching standard library:
rockup installNeither 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
rockcommand 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-lspfor 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 listTo select this exact release instead of the moving stable channel:
rockup install v0.5.0
rockup default v0.5.0Historical 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; runrockup installafterward.rockup-x86_64-unknown-linux-gnu: standalone toolchain manager.rock-v0.5.0-x86_64-unknown-linux-gnu.tar.gz: complete toolchain withrock,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
.sha256file.
Getting started | The Rock Book | Installation guide
Full changelog: v0.4.3...v0.5.0
v0.4.3
What's Changed
- Add \0 as escaped char and generalize escaped char parsing by @Champii in #125
- Escaped chars by @Champii in #132
- Introducing default trait methods by @Champii in #128
- Fix dot notation newline by @Champii in #140
- Struct fields are no more reordered. by @Champii in #138
- Submodule parser errors by @Champii in #137
- Span unification by @Champii in #146
- Replace diagnostics with Ariadne by @Champii in #148
- Bin flags: remove --state --tokens and --repl, add --thir by @Champii in #154
- Reimplement optional type signature to force a type for a fn by @Champii in #156
- Add quiet config and silence tests by @Champii in #160
- Add self prototype notation and self type by @Champii in #162
- v0.4.3 by @Champii in #163
Full Changelog: v0.4.2...v0.4.3
v0.4.2
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
Full Changelog: v0.4.1...v0.4.2