Repository navigation
Immutable
release. Only release title and notes can be modified.
Rock v0.7.2
Rock v0.7.2 warns about unused code by default, infers more generic functions
without explicit signatures, and improves diagnostics for return types and
trait bounds. The compiler now specializes only the code it needs.
Highlights
- Unused-code warnings. The compiler reports unused bindings, unused imports
(including globs), and dead code. Public library API is kept even when the
library itself does not use it. Unused code is still type-checked. - More flexible inference. A function without a signature can keep a generic
interface when callers pass different types. Payload enum constructors can
be passed as functions, andwhereclauses can constrain concrete types,
as inString: From T. The standard functor and monad operators accept
borrowed callbacks. - Clearer errors. Explicit
returnvalues are checked against the enclosing
function or lambda. A method blocked by an implementation bound reports that
bound instead of appearing to be an unknown field. The language server clears
stale diagnostics after reanalysis. - Runtime fixes. Owned array loops move elements even when those elements
need no destructor. The compiler also preserves destructors needed by
temporary values. Standard-library file, socket, and thread operations now
report failures from more underlying POSIX calls.
Upgrading from v0.7.1
- Existing code may produce new warnings. Use
rock build -D unusedto make
all unused-code lints errors, or-A dead_codeto silence only that lint.
-Wrestores a warning. The same flags work withrock runandrockc;
later flags override earlier ones. - If you use
rockcto emit a reusable.rkcadirectly, pass
--crate-type liband--no-linkwith--emit-artifact. Binary crates
cannot emit crate artifacts.rock buildselects these flags automatically. - Rebuild dependency artifacts with the new compiler and use the matching
standard library. If a return mismatch is now reported, make the explicit
return and any reachable final expression agree with the function's result
type.
Install or update
The packaged toolchain targets Linux x86-64 GNU and 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
linked into the toolchain; no separate LLVM installation is needed.
After publication, install with an existing rockup:
rockup self update
rockup install v0.7.2
rockup default v0.7.2
rock --versionFor a fresh installation, use the pinned bootstrap after publication:
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/Rock-lang-org/Rock/releases/download/v0.7.2/install.sh | sh -s -- v0.7.2