| Crates.io | z3950-rs |
| lib.rs | z3950-rs |
| version | 0.2.1 |
| created_at | 2026-01-23 16:22:55.80353+00 |
| updated_at | 2026-01-24 07:47:07.681177+00 |
| description | Minimal asynchronous (Tokio) Z39.50 client with MARC parsing |
| homepage | |
| repository | https://github.com/jcollonville/z3950-rs |
| max_upload_size | |
| id | 2064911 |
| size | 137,109 |
Minimal asynchronous (Tokio) Z39.50 client with MARC parsing via marc-rs. PDUs are encoded/decoded in ASN.1 BER using rasn.
marc_rs::RecordBasic demonstration-oriented implementation. The scan operation is not yet implemented.
use z3950_rs::Client;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let mut client = Client::connect_with_credentials(
"z3950.loc.gov:7090",
Some(("user", "password")),
)
.await?;
let _search = client.search(&["Voyager"], "rust").await?;
let records = client.present_marc(1, 5).await?;
for r in records {
if let Some(title) = r.title() {
println!("{}", title);
}
}
Ok(())
}
A simple example is available in examples/search.rs.
cargo run --example search -- --host z3950.loc.gov --port 7090 --db Voyager --query rust --user foo --password bar