1#![no_std]
2#![allow(non_upper_case_globals)]
3#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5
6mod interop {
7 #[no_mangle]
8 pub fn free(ptr: *mut cty::c_void) {}
9
10 #[no_mangle]
11 pub fn malloc(amt: cty::size_t) -> *mut cty::c_void {
12 core::ptr::null_mut()
13 }
14
15 #[no_mangle]
16 pub fn __assert_func(file: *const char, line: usize, func: *const char, expr: *const char) {
17 panic!("Assertion failed!");
18 }
19
20 use cstr_core::CStr;
21
22 #[no_mangle]
23 pub fn strlen(__s: *const cty::c_char) -> cty::c_uint {
24 unsafe {
25 let c_str = CStr::from_ptr(__s);
27 c_str.to_bytes().len() as u32
28 }
29 }
30}
31
32include!(concat!(env!("OUT_DIR"), "/bindings.rs"));