Skip to content

Commit

Permalink
Some fixes for the release blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Oct 18, 2020
1 parent 53004a1 commit 3108987
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions _posts/2020-10-16-kaitai-struct-v0.9-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,43 @@ categories: news
After a lot of time and effort, Kaitai project is happy to announce
release of new major version of Kaitai Struct, declarative markup
language to describe various binary data structures — binary file
formats, network stream packets, etc.
formats, network packets, etc.

The basic idea of Kaitai Struct is that a particular format can be
described using Kaitai Struct language (in a `.ksy` file), which then
can be compiled using `kaitai-struct-compiler` into source files in
one of the supported programming languages. These modules will include
a generated code for a parser that can read described data structure
from a file / stream and provide access to its contents in a nice,
described using Kaitai Struct language (in a `.ksy` file, that stands
for Kaitai Struct YAML), which then can be compiled using
`kaitai-struct-compiler` into source files in one of the supported
programming languages. These modules will include a generated
code for a parser that can read described data structure from a
file / stream and provide access to its contents in a nice,
easy-to-comprehend API.

With the previous 0.8 release, Kaitai project celebrated 1000 stars on GitHub,
and until 0.9 version, it has collected more than [2000 stars](https://github.com/kaitai-io/kaitai_struct/stargazers).
Thank you all for your support!

This version introduces C++11 target (which uses smart pointers),
several handy features (like `valid`ations and little-endian bit integers),
fixes a lot of bugs and includes quite a few infrastructure improvements.
several handy features (like `valid`ations and little-endian "bit-sized
types"), fixes a lot of bugs and includes quite a few infrastructure
improvements.

## Release highlights

* New targets support:
* Python with [Construct](https://construct.readthedocs.io) library
* HTML - intended for documentation, preliminary support
* Nim - entry-level support (51% tests pass score)
* New KSY language features:
* Python with [Construct](https://construct.readthedocs.io) library ([#377](https://github.com/kaitai-io/kaitai_struct/issues/377))
* HTML - intended for documentation, preliminary support ([ec21bdf62bcc9211e514dd8413ed5f6714a8e6bc](https://github.com/kaitai-io/kaitai_struct_compiler/commit/ec21bdf62bcc9211e514dd8413ed5f6714a8e6bc))
* Nim - entry-level support (51% tests pass score) ([#619](https://github.com/kaitai-io/kaitai_struct/issues/619))
* New KS language features:
* `doc-ref` supports list of references ([#269](https://github.com/kaitai-io/kaitai_struct/issues/269))
* `meta/tags` allows specification of multiple tags to allow better navigation in the format gallery ([#572](https://github.com/kaitai-io/kaitai_struct/issues/572))
* Allow accessing nested types using `::` syntax: `foo::bar` ([#275](https://github.com/kaitai-io/kaitai_struct/issues/275))
* Implement parsed data validations using `valid` key ([#435](https://github.com/kaitai-io/kaitai_struct/issues/435))
* Implement compile-time `sizeof` and `bitsizeof` operators ([#84](https://github.com/kaitai-io/kaitai_struct/issues/84))
* Type-based: `sizeof<u4>`, `bitsizeof<b13>`, `sizeof<user_type>`
* Value-based: `file_header._sizeof`, `flags._bitsizeof` (`file_header`, `flags` are fields defined in the current type)
* Implement little-endian bit-sized integers ([docs](https://doc.kaitai.io/user_guide.html#bit-ints-le))
* Support choosing endianness using `le` / `be` suffix: `type: b12le`, `type: b1be`
* Add `meta/bit-endian` key for selecting default bit endianness (`le` / `be`)
* Implement little-endian-based bit-sized types ([docs](https://doc.kaitai.io/user_guide.html#bit-ints-le))
* Support choosing endianness of bit-sized types using `le` / `be` suffix: `type: b12le`, `type: b1be`
* Add `meta/bit-endian` key for selecting default bit endianness (`le` / `be`) ([#155](https://github.com/kaitai-io/kaitai_struct/issues/155))
* Expression language:
* Forced byte array and true array literals ([#371](https://github.com/kaitai-io/kaitai_struct/issues/371)) and
empty typed array literals ([#372](https://github.com/kaitai-io/kaitai_struct/issues/372))
Expand All @@ -63,7 +65,7 @@ fixes a lot of bugs and includes quite a few infrastructure improvements.
* C++: add C++11 mode
* Add `--cpp-standard` CLI option: pass `--cpp-standard 11` to enable C++11 mode (`98` is default)
* C++11 target:
* uses `#pragma once` (instead of `#ifndef FOO_H_` header guards)
* uses `#pragma once` (instead of `#ifndef FOO_H_` header guards) ([25fb1eee61d07bdc8b199445776836ce9a6606ef](https://github.com/kaitai-io/kaitai_struct_compiler/commit/25fb1eee61d07bdc8b199445776836ce9a6606ef))
* uses `std::unique_ptr<foo>` for owning pointers, raw pointers `foo*` for non-owning
* supports array literals
* `--no-auto-read` implemented for C++
Expand All @@ -72,6 +74,7 @@ fixes a lot of bugs and includes quite a few infrastructure improvements.
* Runtime API changes:
* Add exceptions `Validation{Not{Equal,AnyOf},{Less,Greater}Than,Expr}Error` inheriting from common ancestor `ValidationFailedError` - thrown on failed validations defined with `valid` or `contents` key ([#435](https://github.com/kaitai-io/kaitai_struct/issues/435))
* Add method `read_bits_int_le` for parsing little-endian bit-sized integers ([docs](https://doc.kaitai.io/user_guide.html#bit-ints-le))
* Added an [official library of compression algorithms](https://github.com/kaitai-io/kaitai_compress) to be used in `process` and changed the compiler to allow third-party `process`ors ([#457](https://github.com/kaitai-io/kaitai_struct/issues/457))
* Deprecated classes and methods:
* ~~`ensure_fixed_contents`~~ &#x27F6; explicit `if` that asserts `readBytes(n)` to be equal to the expected `n`-byte array (throwing `ValidationNotEqualError` if it fails)
* ~~`UnexpectedDataError`~~ &#x27F6; `ValidationNotEqualError`
Expand Down Expand Up @@ -99,12 +102,17 @@ fixes a lot of bugs and includes quite a few infrastructure improvements.
Gradle plugin](https://github.com/valery1707/kaitai-gradle-plugin)
* Infrastructure updates:
* Unstable binary builds are available for all platforms after every CI build at Bintray ([#63](https://github.com/kaitai-io/kaitai_struct/issues/63))
* KSY language reference replaced with [documentation](https://doc.kaitai.io/ksy_diagram.html) generated from JSON schema
* KS language reference replaced with [documentation](https://doc.kaitai.io/ksy_diagram.html) generated from [the JSONSchema](https://github.com/kaitai-io/ksy_schema)
* [https://formats.kaitai.io/](https://formats.kaitai.io/) is rebuilt automatically with CI/CD
* Brand new modular CI/CD system for compiler, underlying
CI-agnostic, working on multiple different OSes in parallel
(Linux, Windows, macOS) and showing status at [https://ci.kaitai.io/](https://ci.kaitai.io/)
* Generate test assertion specs from language-agnostic [KST specs](https://doc.kaitai.io/kst.html)
* Created [a list of awes😎me projects related to Kaitai Struct](https://github.com/kaitai-io/awesome-kaitai)
* Alternative compiler implementations specific for target languages, intended for easier integration into them, have been started:
* [ksc-rs](https://github.com/Mingun/ksc-rs) for Rust
* [kaitaigo](https://github.com/cugu/kaitaigo) for Go
* [nimitai](https://github.com/sealmove/nimitai) for nim

</div>

Expand Down

0 comments on commit 3108987

Please sign in to comment.