rustywatch 0.1.9

Live reloading for any programing languages
Documentation

RustyWatch

GitHub Actions Workflow Status GitHub Actions Workflow Status Crates.io Total Downloads Crates.io License docs.rs Crates.io Size GitHub Repo stars GitHub Tag Crates.io Version Codecov


╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╭╮╭╮╭╮╱╱╭╮╱╱╱╭╮
┃╭━╮┃╱╱╱╱╭╯╰╮╱╱╱┃┃┃┃┃┃╱╭╯╰╮╱╱┃┃
┃╰━╯┣╮╭┳━┻╮╭╋╮╱╭┫┃┃┃┃┣━┻╮╭╋━━┫╰━╮
┃╭╮╭┫┃┃┃━━┫┃┃┃╱┃┃╰╯╰╯┃╭╮┃┃┃╭━┫╭╮┃
┃┃┃╰┫╰╯┣━━┃╰┫╰━╯┣╮╭╮╭┫╭╮┃╰┫╰━┫┃┃┃
╰╯╰━┻━━┻━━┻━┻━╮╭╯╰╯╰╯╰╯╰┻━┻━━┻╯╰╯
╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
version: v0.1.5


Live reloading for any programing languages

Usage: rustywatch [OPTIONS] --cmd <COMMAND>

Options:
  -d, --dir <DIR>            [default: .]
  -c, --cmd <COMMAND>
  -i, --ignore <IGNORE>
      --bin-path <BIN_PATH>
  -h, --help                 Print help
  -V, --version              Print version

Live reloading inspired by Go Air build with Rust.

Features

  • Live reloading support for all programming languages
  • Real-time reloading for binaries
  • Optimized build process
  • Automatic detection and monitoring of new directories
  • Enhanced, colorful log output

Install

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

cargo install rustywatch

Usage

To start the project just type rustywatch, but first you need to create the config.

  • Config

Create file rustywatch.yaml in your root directory.

# your path directory
dir: "." # required
# your command to build the project
cmd: "go build main.go" # required
# file you want to ignore
ignore: # optional
  - ".git"
# your path binary location
bin_path: "./main"
# your command arguments to run the binary
bin_arg: # optional
  - "--args"

Run the project

rustywatch

Help

rustywatch --help

More examples

  • Example using with Rust (cargo)
# create new project
cargo new hello-world;
cd hello-world;
# run rustywatch in `./src` directory
rustywatch -d './src' -c 'cargo run'
  • Example using with Go
# create new project
mkdir hello-world;
cd hello-world;
# init go module
go mod init go-project;
# create file main.go
touch main.go;
# edit file main.go
vim main.go
# and run the project with rustywatch
# then the project will be running with hot reload.
rustywatch -d . -c 'go run main.go' --ignore .git
  • Example using with Go (Fiber)
mkdir go-fiber;
cd go-fiber;
go mod init go-fiber;
# install fiber framework
go get github.com/gofiber/fiber/v2
# start live reload with rustywatch
rustywatch -d . -c 'go build main.go' --bin-path './main' --bin-arg server
  • Example using with NodeJS
# create new project
mkdir hello-world;
cd nodejs-project;
# create index.js
touch index.js
# edit file index.js and and run the project with rustywatch 
vim index.js
# then the project will be running with hot reload
rustywatch -d . -c 'node index.js' --ignore '.tmp' --ignore '.git'

Support languages

  • NodeJS
  • Go
  • Rust
  • Javascript
  • (more) Need to testing

Star History

Star History Chart

License

MIT & Apache-2.0