build.rs 528 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

use std::env;
use std::path::Path;

fn main() {
    let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();

    let header_path = Path::new(&crate_dir)
        .join("include")
        .join("nvidia")
Neelay Shah's avatar
Neelay Shah committed
13
        .join("dynamo_llm")
14
15
16
17
18
19
        .join("llm_engine.h");

    cbindgen::generate(crate_dir)
        .expect("Unable to generate bindings")
        .write_to_file(header_path);
}