#json #nwn #parser #library #nasher #nwnee

nwn_nasher_types

A library to parse and de/serialize the files from the nwn community tool, nasher

6 releases

0.3.1 Jun 1, 2023
0.3.0 Jun 1, 2023
0.2.2 May 27, 2023
0.1.0 May 26, 2023

#977 in Game dev

Download history 6/week @ 2024-09-19 2/week @ 2024-09-26

53 downloads per month

MIT license

160KB
2K SLoC

rs_nwn_nasher_types

docs.rs crates.io Crates.io (latest)

A library that provides serialization of Neverwinter Nights json files generated via Nasher

This should allow for the creation of a Rust based module tooling.

Usage

Add the following to your Cargo.toml:

[dependencies]
nwn-nasher-types = "0.3"

Example

use nwn_nasher_types::*;

fn main() {
  let path = "src/module.ifo";
  let nw = NwType::from_file_path(path).expect("Failed to open file");
  match nw {
    Ok(value) => {
      println!("Value: {:?}", value);
    }
    Err(e) => {
      panic!("Failed to deserialize {:?}: {}", path, e);
    }
  }
}

Dependencies

~1.2–2.2MB
~45K SLoC