greaseweazle

Crates.iogreaseweazle
lib.rsgreaseweazle
version0.2.0
created_at2025-07-08 14:29:15.94288+00
updated_at2025-07-20 14:35:54.167768+00
descriptionSupport library to control a Greaseweazle from the host.
homepage
repositoryhttps://codeberg.org/Rua/greaseweazle-rs
max_upload_size
id1742879
size89,896
(Rua)

documentation

README

greaseweazle-rs

licence: EUPL crates.io docs

A Rust library for controlling a Greaseweazle from the host system.

A Greaseweazle is a device that provides direct control and raw flux-level access to a floppy drive; see https://github.com/keirf/greaseweazle/ for more information. This project is not maintained by Keir Fraser and is not affiliated with the official Greaseweazle project in any way.

Design goals

  • Provide public interfaces to access the Greaseweazle at the lowest level possible, with a direct mapping of Rust functions to Greaseweazle serial commands.
  • Provide a base upon which other crates, either maintained by this project or by others, can build higher-level wrappers and convenience types.
  • Minimise the risk of data loss, in case the floppy media is physically failing and may not survive being read more than once.
    • Get the data to the caller as soon as possible, so that it can be saved first and dealt with later.
    • Higher-level interfaces should never be mandatory; they should always allow the user to access the low-level interface and data if desired.

The base greaseweazle crate is not designed to be user-friendly and convenient to get started quickly. It requires more in-depth knowledge than the official Greaseweazle command-line interface, and will probably not produce satisfactory results without tweaking of the inputs and outputs. This is left to higher-level wrapper crates.

Features

libudev : (Linux only) Use libudev when enumerating devices. This requires libudev to be available via pkg-config.

log : Enable logging via the log crate. Currently, this emits trace logs for all Greaseweazle commands that are sent and received.

Disclaimer

Use this library at your own risk! Bad usage or bugs may result in damage to the floppy drive or disks, or in loss of data. The library is still in a very bare, early stage, with not all functionality implemented, and minimal testing. Bugs are likely to occur, and breaking changes frequent. Issue reports and PRs are welcome!

Licence

This project is distributed under the terms of the European Union Public Licence version 1.2 or later, with extension of article 5 (compatibility clause) to any licence for distributing derivative works that have been produced by the normal use of the Work as a library. See the LICENCE.txt file in the project's root directory for the full licence text.

The important parts paraphrased (non-binding) are:

  • You may freely link with this library, both statically and dynamically, from software released under any licence, including proprietary licences.
  • If you copy or incorporate any of the source code of this library into another codebase, then that codebase must be released under EUPL or a compatible licence (as listed in the licence text).

Thus, this library is permissive for linking (like MIT or Apache), but copyleft for source code use (like GPL), also known as "source-only copyleft". See here for a more in-depth summary.

Commit count: 0

cargo fmt