#editor-config

sys editorconfig-sys

Raw FFI bindings to libeditorconfig

3 releases

0.1.2 Oct 19, 2024
0.1.1 Jan 27, 2024
0.1.0 Jan 27, 2024

#5 in #editor-config

Download history 11/week @ 2024-09-23 138/week @ 2024-10-14 28/week @ 2024-10-21 14/week @ 2024-11-04

180 downloads per month
Used in editorconfig-rs

MIT license

14KB
130 lines

Rust FFI Bindings to libeditorconfig

This crate uses bindgen and pkg-config to automatically generate Rust FFI bindings to the editorconfig-core C library.

Following the *-sys package convention, editorconfig-sys is just a thin wrapper around the native libeditorconfig library.

The safe Rust bindings to libeditorconfig, built on top of this editorconfig-sys crate, can be found here.

Workflow status

Dependencies

To use this crate, pkg-config and libeditorconfig >= 0.12.5 must be installed. For example, on Debian or Ubuntu you could use apt install pkg-config libeditorconfig-dev and on macOS brew install pkg-config editorconfig to install the dependencies.

You can check if pkg-config can find the library and which version is installed with:

pkg-config --modversion editorconfig

Installation

Add this to your Cargo.toml:

[dependencies]
editorconfig-sys = "0.1.2"

Usage

Some unsafe Rust code examples can be found in the tests.

Dependencies

~0–1.9MB
~37K SLoC