0.13.0
Added a Rust crate for the Watcher.
use futures::StreamExt;
use wtr_watcher::Watch;
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let show = |e| async move { println!("{e:?}") };
let events = Watch::try_new(".")?;
events.for_each(show).await;
Ok(())
}
The crate is available on crates.io.
Made the Github release CI depend on Wheels being built (and from uploading stale wheels because of that).
Various documentations improvements:
- Example usage for the new Rust crate
- PyPi and Crates.io badges in the readme
Various chores around the watcher-nodejs project:
- Simplified the napi bindings
- Left more of the type definitions to the typescript side (instead of the napi side)
- Various C paranoia fixes, out of caution, in case napi doesn't initialize various things
Fixed (was missing) the effect_time
field in the watcher-nodejs project's event type.
Made the Python project consistent with our other languages:
- The event object's field are in the same order as C/Rust/Js
- The output of the "example" CLI is the same JSON event format as the other languages (was previously a Python object dump)
- The effect time is represented as a number (nanosecond since epoch), not a datetime (which loses precision and is inconsistent with the other languages)
- The associated path name is an optional string, not a maybe empty string