tidy-sys

Crates.iotidy-sys
lib.rstidy-sys
version0.8.2
sourcesrc
created_at2023-12-13 19:44:26.92791
updated_at2024-08-27 12:49:58.972239
descriptionRaw FFI bindings to the Tidy C library
homepagehttps://github.com/insomnimus/tidy-sys
repositoryhttps://github.com/insomnimus/tidy-sys
max_upload_size
id1068304
size4,958,779
(insomnimus)

documentation

README

tidy-sys

Rust bindings for the HTML Tidy library.

Documentation

Note About Vendored Dependencies

The source code for Tidy is vendored in this repository for ease of use, under the vendor/ directory. Otherwise this is an unassociated project.

Also note that Tidy has its own license; this crate's license is for files excluding the vendor/ directory.

Requirements

This crate will build the Tidy library from source and generate bindings depending on the target platform. Some external tools are required:

  • CMake (Tidy uses CMake as the build system)
  • A C compiler (to compile Tidy)
  • Clang (as bindgen needs it)

The Default Build Configuration

Tidy will be built with:

  • -DNDEBUG, regardless of the rust profile (not setting it causes Tidy to debug-log to stderr uncontrollably)
  • CMake profile always set to Release as other values cause problems with Visual Studio generators
  • Optimization level matching the rust build's opt-level (overwritten with CFLAGS and TIDY_SYS_CFLAGS)

Setting Build Options

This crate respects the standard environment variables used by C compilers and related tools, such as CC, CFLAGS, LD etc.

In addition, you can set the TIDY_SYS_CFLAGS environment variable; the values will be appended to CFLAGS while building Tidy.

Crate Features

Currently there's only one feature, by default disabled:

  • localization: Enable multi-language support in Tidy (sets the SUPPORT_LOCALIZATIONS option to on with CMake).
Commit count: 13

cargo fmt