tensorflow-sys 0.24.0

The package provides bindings to TensorFlow.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::ffi::CStr;
use tensorflow_sys as ffi;

#[cfg_attr(feature = "examples_system_alloc", global_allocator)]
#[cfg(feature = "examples_system_alloc")]
static ALLOCATOR: std::alloc::System = std::alloc::System;

fn main() {
    println!("{}", unsafe {
        CStr::from_ptr(ffi::TF_Version())
            .to_string_lossy()
            .into_owned()
    },);
}