blob: ec04254af14cfb37be4fec40df6ffe422645f780 [file] [log] [blame] [edit]
// Part of the Crubit project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include <cstdint>
#include <iostream>
// The generated bindings are in a header at the same path as the
// `example_crate` rust_library, with a `.h` suffix.
#include "examples/rust/function/example_crate.h"
int main(int argc, char* argv[]) {
// The generated bindings are in a namespace with the same name as the
// target crate:
int32_t sum = example_crate::add_two_integers(2, 2);
std::cout << "sum = " << sum << std::endl;
return 0;
}