.PHONY: all build clean run-server run-client-ws run-client-quic run-client-auto gen-cert
WS_PORT ?= 8080
QUIC_PORT ?= 8081
all: build
build:
cargo build
clean:
cargo clean
run-server: build
RUST_LOG=debug cargo run --example chatroom_server
run-client-ws: build
RUST_LOG=debug cargo run --example chatroom_client ws
run-client-quic: build
RUST_LOG=debug cargo run --example chatroom_client quic
run-client-auto: build
RUST_LOG=debug cargo run --example chatroom_client auto
gen-cert:
mkdir -p certs
openssl req -x509 -newkey rsa:4096 -keyout certs/key.pem -out certs/cert.pem \
-days 365 -nodes -subj "/CN=localhost"
server:
RUST_LOG=debug cargo run --example chatroom_server
client:
RUST_LOG=debug cargo run --example chatroom_client
quic_server:
RUST_LOG=debug cargo run --example quic_chat server
quic_client:
RUST_LOG=debug cargo run --example quic_chat client