mirror of https://github.com/encounter/nod-rs.git
Build fix attempts
This commit is contained in:
parent
4f794f06cb
commit
ec85b8380d
|
@ -13,7 +13,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
toolchain: [ stable, 1.56.0, nightly ]
|
toolchain: [ stable, 1.57.0, nightly ]
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -D warnings
|
RUSTFLAGS: -D warnings
|
||||||
steps:
|
steps:
|
||||||
|
@ -133,7 +133,7 @@ jobs:
|
||||||
sudo apt-get -y install ${{ matrix.packages }}
|
sudo apt-get -y install ${{ matrix.packages }}
|
||||||
- name: Install cargo-zigbuild
|
- name: Install cargo-zigbuild
|
||||||
if: matrix.build == 'zigbuild'
|
if: matrix.build == 'zigbuild'
|
||||||
run: pip install ziglang==0.11.0 cargo-zigbuild==0.18.3
|
run: pip install ziglang==0.10.1.post1 cargo-zigbuild==0.17.0
|
||||||
- name: Setup Rust toolchain
|
- name: Setup Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
name = "nod"
|
name = "nod"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.56.0"
|
rust-version = "1.57.0"
|
||||||
authors = ["Luke Street <luke@street.dev>"]
|
authors = ["Luke Street <luke@street.dev>"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
repository = "https://github.com/encounter/nod-rs"
|
repository = "https://github.com/encounter/nod-rs"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
[crates.io]: https://crates.io/crates/nod
|
[crates.io]: https://crates.io/crates/nod
|
||||||
[Api Rustdoc]: https://img.shields.io/badge/api-rustdoc-blue.svg
|
[Api Rustdoc]: https://img.shields.io/badge/api-rustdoc-blue.svg
|
||||||
[rustdoc]: https://docs.rs/nod
|
[rustdoc]: https://docs.rs/nod
|
||||||
[Rust Version]: https://img.shields.io/badge/rust-1.51+-blue.svg?maxAge=3600
|
[Rust Version]: https://img.shields.io/badge/rust-1.57+-blue.svg?maxAge=3600
|
||||||
|
|
||||||
Library for traversing & reading GameCube and Wii disc images.
|
Library for traversing & reading GameCube and Wii disc images.
|
||||||
|
|
||||||
|
@ -54,7 +54,11 @@ fn main() -> nod::Result<()> {
|
||||||
let header = partition.read_header()?;
|
let header = partition.read_header()?;
|
||||||
if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
|
if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
|
||||||
let mut s = String::new();
|
let mut s = String::new();
|
||||||
partition.begin_file_stream(node)?.read_to_string(&mut s).expect("Failed to read file");
|
partition
|
||||||
|
.begin_file_stream(node)
|
||||||
|
.expect("Failed to open file stream")
|
||||||
|
.read_to_string(&mut s)
|
||||||
|
.expect("Failed to read file");
|
||||||
println!("{}", s);
|
println!("{}", s);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
msrv = "1.51"
|
|
|
@ -329,7 +329,11 @@ pub trait PartReadStream: ReadStream {
|
||||||
/// let header = partition.read_header()?;
|
/// let header = partition.read_header()?;
|
||||||
/// if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
|
/// if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
|
||||||
/// let mut s = String::new();
|
/// let mut s = String::new();
|
||||||
/// partition.begin_file_stream(node)?.read_to_string(&mut s).expect("Failed to read file");
|
/// partition
|
||||||
|
/// .begin_file_stream(node)
|
||||||
|
/// .expect("Failed to open file stream")
|
||||||
|
/// .read_to_string(&mut s)
|
||||||
|
/// .expect("Failed to read file");
|
||||||
/// println!("{}", s);
|
/// println!("{}", s);
|
||||||
/// }
|
/// }
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
|
|
|
@ -99,8 +99,7 @@ pub fn new_disc_io_from_buf(buf: &[u8]) -> Result<Box<dyn DiscIO + '_>> {
|
||||||
///
|
///
|
||||||
/// Basic usage:
|
/// Basic usage:
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// use nod::io::new_disc_io_from_stream;
|
/// use nod::{io::new_disc_io_from_stream, streams::ByteReadStream};
|
||||||
/// use nod::streams::ByteReadStream;
|
|
||||||
///
|
///
|
||||||
/// # fn main() -> nod::Result<()> {
|
/// # fn main() -> nod::Result<()> {
|
||||||
/// # #[allow(non_upper_case_globals)] const buf: &[u8] = &[0u8; 0];
|
/// # #[allow(non_upper_case_globals)] const buf: &[u8] = &[0u8; 0];
|
||||||
|
|
|
@ -30,7 +30,11 @@
|
||||||
//! let header = partition.read_header()?;
|
//! let header = partition.read_header()?;
|
||||||
//! if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
|
//! if let Some(NodeType::File(node)) = header.find_node("/MP3/Worlds.txt") {
|
||||||
//! let mut s = String::new();
|
//! let mut s = String::new();
|
||||||
//! partition.begin_file_stream(node)?.read_to_string(&mut s).expect("Failed to read file");
|
//! partition
|
||||||
|
//! .begin_file_stream(node)
|
||||||
|
//! .expect("Failed to open file stream")
|
||||||
|
//! .read_to_string(&mut s)
|
||||||
|
//! .expect("Failed to read file");
|
||||||
//! println!("{}", s);
|
//! println!("{}", s);
|
||||||
//! }
|
//! }
|
||||||
//! Ok(())
|
//! Ok(())
|
||||||
|
|
Loading…
Reference in New Issue