From b906cb9f7a3a9d6d3d4f985931f34a149ce47d68 Mon Sep 17 00:00:00 2001 From: LN Liberda Date: Thu, 5 Dec 2024 15:58:32 +0100 Subject: [PATCH] c-api: use cargo-c --- c-api/Cargo.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/c-api/Cargo.toml b/c-api/Cargo.toml index 83ad6f75..93b18680 100644 --- a/c-api/Cargo.toml +++ b/c-api/Cargo.toml @@ -1,11 +1,17 @@ [package] name = "lol_html_c_api" version = "1.1.2" +description = "Low output latency streaming HTML parser/rewriter" authors = ["Ivan Nikulin ", "Joshua Nelson "] edition = "2021" links = "lolhtml" publish = false +[features] +default = ["capi"] +# Required to exist for cargo-c to work +capi = [] + [dependencies] encoding_rs = "0.8.13" lol_html = { path = "../" } @@ -19,3 +25,15 @@ lto = true [lib] name = "lolhtml" crate-type = ["staticlib", "cdylib", "rlib"] + +[package.metadata.capi.header] +name = "lol_html" +subdirectory = "" +generation = false + +[package.metadata.capi.install.include] +asset = [{ from = "include/lol_html.h" }] + +[package.metadata.capi.pkg_config] +name = "lol-html" +filename = "lol-html"