ironring: split lib and bin code
This commit is contained in:
parent
026797d935
commit
72cc3fecb6
|
@ -4,7 +4,12 @@ version = "0.1.0"
|
|||
authors = ["Dece <shgck@pistache.land>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[lib]
|
||||
name = "rir"
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
||||
[[bin]]
|
||||
name = "ironring"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.33"
|
||||
|
|
8
ffi_tests.py
Normal file
8
ffi_tests.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Import hash from the rir dynamic lib."""
|
||||
|
||||
import sys
|
||||
from ctypes import cdll
|
||||
|
||||
lib = cdll.LoadLibrary(sys.argv[1])
|
||||
#print(lib.name_hashes.hash("/chr/c0000.anibnd.dcx"))
|
|
@ -5,16 +5,7 @@ use std::process;
|
|||
|
||||
use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
|
||||
|
||||
mod name_hashes;
|
||||
mod parsers {
|
||||
pub mod bhd;
|
||||
}
|
||||
mod unpackers {
|
||||
pub mod bhd;
|
||||
}
|
||||
mod utils {
|
||||
pub mod fs;
|
||||
}
|
||||
use rir::{name_hashes, unpackers};
|
||||
|
||||
fn main() {
|
||||
let default_namefilepath: &str = &get_default_namefilepath();
|
11
src/lib.rs
Normal file
11
src/lib.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
pub mod name_hashes;
|
||||
pub mod parsers {
|
||||
pub mod bhd;
|
||||
}
|
||||
pub mod unpackers {
|
||||
pub mod bhd;
|
||||
}
|
||||
pub mod utils {
|
||||
pub mod fs;
|
||||
}
|
||||
|
Reference in a new issue