Updated Cargo.toml and added library code