typst-cffi 0.4.0

FFI to Typst
Documentation
// Copyright ©2025 The typst-cffi Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

use cbindgen::Language;
use std::env;

fn main() {
    println!("cargo:rerun-if-changed=src/lib.rs");

    let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();

    cbindgen::Builder::new()
        .with_crate(manifest_dir)
        .with_language(Language::C)
        .with_header(
            "// Copyright ©2025 The typst-cffi Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
",
        )
        .generate()
        .expect("Unable to generate C bindings")
        .write_to_file("typst-cffi.h");
}