Crates.io Documentation License Workflow Status

ldtk2

A thin crate for people who just want to use ldtk files freely.

Usage

sh cargo add ldtk2

```rust use std::error::Error; use std::path::Path; use std::convert::TryInto;

fn main() -> Result<(), Box> { use ldtk2::Ldtk;

let map = Ldtk::frompath("tests/example.ldtk")?; // or let map: Ldtk = Path::new("tests/example.ldtk").tryinto()?; // or let map = Ldtk::fromstr(includestr!("../tests/example.ldtk"))?; // or let map: Ldtk = includestr!("../tests/example.ldtk").tryinto()?;

Ok(()) } ```

Why did I create this nonsense?