Skip to content

v0.9.4

Latest

Choose a tag to compare

@pantoniou pantoniou released this 03 Feb 18:33
· 69 commits to master since this release
v0.9.4

libfyaml v0.9.4

A major release adding full native Windows support and moving comment handling out of experimental status.

Major: Full Windows Support

libfyaml now builds and runs natively on Windows with full support for MSVC, clang-cl, and Clang compilers.

Native Windows Builds

  • Full support for MSVC (32-bit and 64-bit)
  • clang-cl and Clang support
  • Works with Visual Studio, VSCode, and other Windows IDEs
  • All tests pass on Windows

Cross-Compilation from Linux

Using msvc-wine you can build Windows binaries from Linux:

# Compile using cl.exe via Wine
cmake -DMSVC_WINE_DIR=/path/to/msvc -DMSVC_WINE_COMPILER=cl ..

# Compile using clang-cl without Wine
cmake -DMSVC_WINE_DIR=/path/to/msvc -DMSVC_WINE_COMPILER=clang-cl ..

# Compile using Clang cross-compilation
cmake -DMSVC_WINE_DIR=/path/to/msvc -DMSVC_WINE_COMPILER=clang ..

Major: Comment Support Now Stable

Comment parsing and emission has been moved out of experimental status. Comments can now be reliably preserved and manipulated through the API.

New Features

API Additions

  • fy_node_set_style(): Set the style of a node (block, flow, plain, etc.) - Fixes #78
  • fy_token_set_comment(): Attach comments to tokens programmatically
  • fy_event_to_string(): Convert events to string representation
  • fy_diag_get_collect_errors(): Query if error collection is enabled
  • fy_atom_lines_containing(): Get lines containing an atom (useful for diagnostics)

Build System

  • New CMake-based GitHub Actions CI workflow
  • Improved build matrix coverage
  • Emscripten platform support

Bug Fixes

Critical Fixes

  • #193: Token creation now properly clears memory (prevents UB on invalid input)
  • #186: Reference loop nesting now respected when checking link validity
  • #185: Fixed crash when setting document root to NULL; input size clamping fix
  • #184, #182: Walk expression bugs with improved debug infrastructure
  • #183, #191: Early error on FYECF_EXTENDED_CFG with helper emit methods
  • #181: Walk double-free on node delete
  • #178, #177: Walk error path handling for recursive alias resolution
  • #176: Off-by-one error in fy_accel_grow
  • #175: Parser crash on corrupted UTF-8 at end of file
  • #174: Superfluous document end marker with version/tag directives
  • #173, #172: Depth limit for node copy (prevents stack overflow)
  • #143: Document root now correctly marked as attached

Other Fixes

  • Emit state reset at end of document (fixes multi-document streams)
  • Flow quoting error on ANY style
  • Empty file/stream handling on various platforms
  • Removed notice for multiple alias declarations (valid YAML)

Platform Support

Supported platforms: Linux, macOS, FreeBSD, OpenBSD, NetBSD, and Windows.

Windows-Specific

  • Full native MSVC support (32-bit and 64-bit)
  • Fixed intrinsics for 32-bit builds
  • Proper CRLF (DOS line ending) handling
  • msvc-wine cross-compilation support

Portability Improvements

  • Fixed void pointer arithmetic (strict C compliance)
  • Fixed GCC ternary extension (x ? : y)
  • Fixed \e escape sequence
  • Fixed mremap page alignment (BSD crash fix)

macOS

  • Fixed ASAN support (link-time flags)
  • Apple clang alloca poisoning workaround

Statistics

  • 58 commits since v0.9.3
  • 18 bug fix issues closed
  • Full Windows platform support added

Installation

From Source

# CMake (all platforms including Windows)
mkdir build && cd build
cmake ..
cmake --build .
cmake --install .

# Autotools (Unix-like systems)
./bootstrap.sh
./configure
make
sudo make install

Using CMake

find_package(libfyaml 0.9.4 REQUIRED)
target_link_libraries(your_app PRIVATE libfyaml::libfyaml)

Resources


Full Changelog: v0.9.3...v0.9.4