Run multiple processes concurrently.
Written in Rust with ☕
$ cargo install concurrently
Create a tasks.toml
file in the root of your project:
[tasks.api]
cargo_workspace_member = true # Run the api cargo package
retries = 3 # Retry 3 times before exiting
delay = 1000 # Wait 1 second before running
[tasks.domain]
cargo_workspace_member = true # Run the api cargo package
release = true # Run in --release mode
[tasks.relay]
# Run a custom command
command = [
"docker",
"run",
"--name=auth-outbox-relay",
"--net=host",
"--init",
"--rm",
"acidic9/outbox-relay:latest",
"./outbox-relay -d $DATABASE_URL -r $REDPANDA_HOST",
]
retries = 3 # Retry 3 times before exiting
delay = 1000 # Wait 1 second before running
Now you can simply run concurrently:
$ cargo concurrently
watch -n1 -d echo 'Hello from Demo 1 - $(date)'
- nice command to generate endless process, problem: does not write to stdout- Endless echo loop:
while true ; do echo "Hello from Demo 1 - $(date)" ; sleep 1 ; done
cargo build --release
Instructions for how to do cross-platform compile: https://kerkour.com/rust-cross-compilation
TL;DR from Mac (Intel) to Windows
- Install
cargo install -f cross
- Run
cross build --target x86_64-pc-windows-gnu --release
TL;DR from Mac (Intel) to Linux (WIP)
- Run
cross build --target x86_64-unknown-linux-gnu --release
- Run
cross build --target aarch64-unknown-linux-gnu --release
- Build github actions pipe to autobuild this tool