xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/ios/main_lib.m (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifan#include <stdio.h>
2*d4726bddSHONG Yifan
3*d4726bddSHONG Yifan// Instead of doing this manually https://github.com/dtolnay/cxx could be used for complex examples
4*d4726bddSHONG Yifanextern int32_t get_a_value_from_rust(void);
5*d4726bddSHONG Yifanextern void print_something_from_rust(void);
6*d4726bddSHONG Yifan
7*d4726bddSHONG Yifanint main() {
8*d4726bddSHONG Yifan  print_something_from_rust();
9*d4726bddSHONG Yifan  printf("Some value from rust: %d\n", get_a_value_from_rust());
10*d4726bddSHONG Yifan  return 0;
11*d4726bddSHONG Yifan}
12