vendored-meson/meson/test cases/rust/5 polyglot static/clib.c
raw| 1 | #include <stdio.h> |
| 2 | #include <stdint.h> |
| 3 | |
| 4 | int32_t hello_from_rust(const int32_t a, const int32_t b); |
| 5 | |
| 6 | static void hello_from_c(void) { |
| 7 | printf("Hello from C!\n"); |
| 8 | } |
| 9 | |
| 10 | void hello_from_both(void) { |
| 11 | hello_from_c(); |
| 12 | if (hello_from_rust(2, 3) == 5) |
| 13 | printf("Hello from Rust!\n"); |
| 14 | } |