Expand description
§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.
§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.3"§Usage
Some unsafe Rust code examples can be found in the tests.
Constants§
Functions§
- editorconfig_
get_ ⚠error_ msg - @brief Get the error message from the error number returned by editorconfig_parse().
- editorconfig_
get_ ⚠version - @brief Get the version number of EditorConfig.
- editorconfig_
get_ ⚠version_ suffix - @brief Get the version suffix.
- editorconfig_
handle_ ⚠destroy - @brief Destroy an editorconfig_handle object
- editorconfig_
handle_ ⚠get_ conf_ file_ name - @brief Get the conf_file_name field of an editorconfig_handle object.
- editorconfig_
handle_ ⚠get_ err_ file - @brief Get the err_file field of an editorconfig_handle object
- editorconfig_
handle_ ⚠get_ name_ value - @brief Get the nth name and value fields of an editorconfig_handle object.
- editorconfig_
handle_ ⚠get_ name_ value_ count - @brief Get the count of name and value fields of an editorconfig_handle object.
- editorconfig_
handle_ ⚠get_ version - @brief Get the version fields of an editorconfig_handle object.
- editorconfig_
handle_ ⚠init - @brief Create and intialize a default editorconfig_handle object.
- editorconfig_
handle_ ⚠set_ conf_ file_ name - @brief Set the conf_file_name field of an editorconfig_handle object.
- editorconfig_
handle_ ⚠set_ version - @brief Set the version fields of an editorconfig_handle object.
- editorconfig_
parse ⚠ - @brief Parse editorconfig files corresponding to the file path given by full_filename, and related information is input and output in h.
Type Aliases§
- editorconfig_
handle - @brief The editorconfig handle object type