Hare 0.25.2 released: On June 21, 2025 by Drew DeVault. It's been about a year since Hare 0.24.2. Packed with language features, stdlib updates, bugfixes, and improvements.
- Compatible with qbe 1.2: Hare 0.25.2 is compatible with version 1.2 of qbe.
- New here?: Hare is a systems programming language with a simple and robust design, using a static type system, manual memory management, and a minimal runtime. Learn more here.
Release highlights:
- Buffered I/O improvements: The bufio:: and memio:: modules have several enhancements, including options to fine-tune bufio::scanner, a "nonblocking" mode for memio:: streams, managed bufio::stream modes, os::open_buffered and os::create_buffered, and io::seek support for bufio::scanner.
- Documentation tooling improvements: The haredoc tool now looks for short summaries at the start of module READMEs, tracks symbol-source code locations, and adds source links to HTML output and new command line flags (-n and -N).
- Expanded Unix API coverage: This release expands Unix/POSIX API coverage with features like io::fsync, io::fdatasync, unix::getrlimit, unix::setrlimit, and fcntl via os::getflags and os::setflags. It also ports existing POSIX shared memory support to NetBSD.
- Integration of third-party tools into hare(1): From this release, the build driver, hare(1), can be extended by third-parties via the hare tool subcommand. The new hare-update tool is an example.
- Mandatory error handling in out-of-memory conditions: Users are now required to handle out-of-memory errors with the new "nomem" type. The hare-update tool can help with adapting code.
- Revised and improved APIs for time/date support: Hare's time and date support has been improved and refined, with simple tweaks throughout the API to make it easier to understand and handle time/date handling. It also includes support for PETZ (POSIX Extending TZ) rules.
- Semantic code annotations: This release adds support for semantic code annotations to enrich Hare code with additional metadata.
- Tooling for updating codebases affected by breaking changes: The optional hare-update tool assists in updating codebases affected by breaking changes in Hare upstream.
Breaking changes:
- All memory allocations now return "nomem" on failure. Affected features include alloc, insert, append built-ins, and stdlib functions.
- os::exec::lookup now returns fs::error if the desired command is not found.
- time::chrono::moment now only holds an instant and timescale. Various fields and functions have been moved or renamed.
- time::chrono::analytical has been removed.
- time::chrono::convert now expects a time::chrono::moment.
- time::chrono::discontinuity error has been replaced with tscmismatch error.
- time::date::unit has been renamed to step, and related functions renamed.
- time::date::coincident now tests for the same locality.
- time::date::simultaneous is removed.
- time:: functions for Unix timestamps have been removed.
- time::date::fixedzone now allocates the return value.
- The io::copier function type has been changed.
- Additional information for downstream distributions: Downstream distributions may need to make changes to accommodate Hare 0.25.2. The hare-tool subcommand executes programs in libexecdir. Update config.mk with
LIBEXECDIR = $(PREFIX)/libexec
andTOOLDIR = $(LIBEXECDIR)/hare
. Package and ship the hare-update tool alongside the release. Hare-update is an optional add-on with its own versioning.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。