vowpalwabbit-sys 8.8.0+post1

Rust bindings for VowpalWabbit
docs.rs failed to build vowpalwabbit-sys-8.8.0+post1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: vowpalwabbit-sys-8.8.1+vw-v8.8.0

Rust bindings for the VowpalWabbit C-binding surface.

Example

The following is an example for a basic usecase similar to command line driver mode. VW is initialized, an example run through the parser then prediction pipeline. Finally the example and VW object are finished.

use std::ffi::CString;

unsafe {
let command_line_str = CString::new("--quiet").unwrap();
let vw_handle = vowpalwabbit_sys::VW_InitializeA(command_line_str.as_ptr());
let example_str =
CString::new("1 | test example=1").unwrap();
let example_handle = vowpalwabbit_sys::VW_ReadExampleA(vw_handle, example_str.as_ptr());

vowpalwabbit_sys::VW_Predict(vw_handle, example_handle);
vowpalwabbit_sys::VW_Learn(vw_handle, example_handle);
vowpalwabbit_sys::VW_FinishExample(vw_handle, example_handle);
vowpalwabbit_sys::VW_Finish(vw_handle);
}