项目作者: nikhilmitrax

项目描述 :
Get desktop notifications for your cargo build commands
高级语言: Rust
项目地址: git://github.com/nikhilmitrax/cargo-notify.git
创建时间: 2020-01-01T22:30:57Z
项目社区:https://github.com/nikhilmitrax/cargo-notify

开源协议:MIT License

下载


cargo-notify

Cargo notify is a cargo plugin to run cargo build-like commands(check, build) and notify users of build completion and number of errors found (if any) through desktop notifications. Pairs nicely with cargo-watch.

Screenshots


Installation

  1. cargo install --git https://github.com/nikhilmitrax/cargo-notify

But why?

The usual development workflow to notice errors in builds is to run (RLS/rust-analyzer) in the IDE, and potentially use carg-watch to run check/build on file change. This works fairly well for small or medium sized projects, but can get a bit cumbersome for larger projects, where the compile time may be longer than a few seconds, at which point, getting a notification is useful.

Interface

cargo notify <cmd>.

For example

  1. cargo notify check
  2. cargo watch -c -x 'notify check'

Contribution Ideas

Any contributions are welcome, but here are a few ideas I hope someone would explore.

  • Remove vendorized cargo_metadata and use the crate directly: The last time I tried using it, there were some problems, and I decided to vendorize and modify it to get going, but maybe we should directly use the crate, and create issues in cargo_metadata’s repo if it isn’t usable as is. Done! :tada:

  • Cross Platform Support: Currently tested and found working on MacOS, but the underlying notification crate notify-rust supports BSD and Linux as well, just that it’s untested on Linux and BSD.

  • Support for richer notifications: It currently notifies just the number of errors during compilation. It could potentially support richer notifications.