Better wrapping with Rust
Trying to hide most of the CXX nastiness behind the actual module Move the CXX ffi stuff to its own module Separate mgr and module mods Modify main.rs to use the basic code we have done so far
This commit is contained in:
+7
-3
@@ -1,6 +1,10 @@
|
||||
use sword_rs::mgr::{new_mgr, Mgr};
|
||||
use sword_rs::mgr::Mgr;
|
||||
|
||||
fn main() {
|
||||
let mgr = new_mgr();
|
||||
println!("{:?}", mgr.get_modules());
|
||||
let mut mgr = Mgr::new();
|
||||
for mod_name in mgr.get_modules() {
|
||||
let mut module = mgr.get_module(&mod_name);
|
||||
println!("Module: {}", module.get_name());
|
||||
println!("Text: {}", module.strip_text());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user