blob: 9c13b1be942a8c21eb5a4c370697a656f0e195a5 [file] [log] [blame]
Brian Silverman8751d482022-05-18 23:28:44 -07001// A very minimal rust_library linked into a cc_binary to make sure we still get
2// the allocator symbols linked in.
3
4#include <stdint.h>
5#include <stdio.h>
6
7extern "C" int32_t rust_return5();
8
9extern "C" uint8_t c_return5() { return 5; }
10
11extern "C" void c_take5(uint8_t *) {}
12
13int main() {
14 const int rust_result = rust_return5();
15 printf("Rust says: %d\n", rust_result);
16 if (rust_result != 5) {
17 return 1;
18 }
19}