Crates.io | adflib |
lib.rs | adflib |
version | 0.1.4 |
source | src |
created_at | 2022-09-06 05:58:35.230133 |
updated_at | 2024-09-26 05:03:59.17843 |
description | adflib is a library to handle amiga disk files |
homepage | https://github.com/vschwaberow/adflib |
repository | https://github.com/vschwaberow/adflib |
max_upload_size | |
id | 659318 |
size | 82,490 |
A Rust library and command-line tool for managing ADF (Amiga Disk File) files.
While working on cross-development for the Amiga, I needed a way to manage ADF files. Existing libraries weren't written in Rust, which was my preferred language for tool development. Thus, I decided to create a Rust-based library for managing ADF files. The library is still in its early stages and is not yet feature-complete or extensively tested.
Add this to your Cargo.toml
:
[dependencies]
adflib = "<ACTUAL VERSION>"
Basic usage example:
use adflib::ADF;
use std::io::Result;
fn main() -> Result<()> {
let adf = ADF::from_file("my_disk.adf")?;
println!("ADF file loaded successfully");
Ok(())
}
Getting disk information:
use adflib::ADF;
use std::io::Result;
fn main() -> Result<()> {
let adf = ADF::from_file("my_disk.adf")?;
let disk_info = adf.information?;
println!("ADF file loaded successfully");
Ok(())
}
Extract files from ADF image:
use adflib::ADF;
use std::io::Result;
fn main() -> Result<()> {
let adf = ADF::from_file("my_disk.adf")?;
let extracted_file = adf.extract_file("my_file.txt")?;
Ok(())
}
Read the documentation for more details.
The library comes with a command-line tool for common ADF operations.
cargo install adflib
adflib <COMMAND> [OPTIONS]
Commands:
info
Display information about an ADF file
list
List contents of an ADF file
extract
Extract files from an ADF image
create
Create a new ADF image
bitmap
Show the bitmap of an ADF image
Example:
adflib info my_disk.adf
The library is based on the ADF File Format specification and draws inspiration from the concepts in Laurent Clevy's ADF library. However, it's a pure Rust implementation without using any C code or the original ADF library. And it's rewritten from scratch.
The project is still in active development. Contributions, bug reports, and feature requests are welcome!
This project is dual-licensed under MIT and Apache 2.0. See the LICENSE-MIT and LICENSE-APACHE files for details.
Contributions are welcome! If you'd like to contribute, please feel free to submit a pull request or open an issue for discussion. Any help in improving the library, adding features, or enhancing documentation is greatly appreciated.