[README][dev] improved README, adjusted scripts
This commit is contained in:
parent
fda97f53be
commit
b8bedbdfab
19
README.md
19
README.md
@ -10,16 +10,7 @@ Simple server and GUI for LAN parties.
|
|||||||
### Prerequisites
|
### Prerequisites
|
||||||
```bash
|
```bash
|
||||||
# install Tauri CLI
|
# install Tauri CLI
|
||||||
cargo install tauri-cli --version "^2.0.0"
|
cargo install tauri-cli
|
||||||
|
|
||||||
# install trunk (Build, bundle & ship your Rust WASM application to the web)
|
|
||||||
cargo install trunk
|
|
||||||
# alternatively if you have problems (i.e. on Windows)
|
|
||||||
cargo install cargo-binstall
|
|
||||||
cargo binstall trunk
|
|
||||||
|
|
||||||
# install Rust WASM target
|
|
||||||
rustup target add wasm32-unknown-unknown
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
@ -28,14 +19,20 @@ rustup target add wasm32-unknown-unknown
|
|||||||
# Development
|
# Development
|
||||||
cargo tauri dev # prefix with RUST_LOG=your_module=debug or similary for more verbose output
|
cargo tauri dev # prefix with RUST_LOG=your_module=debug or similary for more verbose output
|
||||||
|
|
||||||
|
# Production but for testing and without bundling
|
||||||
|
cargo tauri build --no-bundle
|
||||||
|
|
||||||
# Production
|
# Production
|
||||||
cargo tauri build --profile release-lto # also bundles everything into a nice platform-specific installer
|
cargo tauri build --profile release-lto # also bundles everything into a nice platform-specific installer
|
||||||
|
|
||||||
|
# on wayland you probably need to set this env var
|
||||||
|
WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Backend
|
#### Backend
|
||||||
```bash
|
```bash
|
||||||
# Development
|
# Development
|
||||||
./server.sh # prefix with RUST_LOG=your_module=debug or similary for more verbose output
|
./server.sh [options...] # prefix with RUST_LOG=your_module=debug or similary for more verbose output
|
||||||
|
|
||||||
# Production
|
# Production
|
||||||
cargo build --profile release-lto
|
cargo build --profile release-lto
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
export RUST_LOG=info,lanspread_client=debug,lanspread_proto=debug
|
|
||||||
#export RUST_LOG=error
|
|
||||||
|
|
||||||
exec cargo run -p lanspread-client -- "$@" < <(while sleep 0.1; do echo "list"; sleep 0.1; echo "get 1"; sleep 0.1; echo "get 25"; done)
|
|
||||||
#RUST_LOG=info exec cargo run --profile release-lto -p lanspread-client < <(while sleep 0.1; do echo "list"; sleep 0.1; echo "get 1"; sleep 0.1; echo "get 25"; done)
|
|
@ -2,5 +2,3 @@
|
|||||||
|
|
||||||
export RUST_LOG=info,lanspread=debug
|
export RUST_LOG=info,lanspread=debug
|
||||||
exec cargo run -p lanspread-server -- "$@"
|
exec cargo run -p lanspread-server -- "$@"
|
||||||
|
|
||||||
#RUST_LOG=info exec cargo run --profile release-lto -p lanspread-server
|
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
$Env:RUST_LOG = "info,lanspread_client=debug,lanspread_proto=debug"
|
|
||||||
|
|
||||||
# Start the process with redirected standard input
|
|
||||||
$processInfo = New-Object System.Diagnostics.ProcessStartInfo
|
|
||||||
$processInfo.FileName = "cargo"
|
|
||||||
$processInfo.Arguments = "run -p lanspread-client -- $args"
|
|
||||||
$processInfo.UseShellExecute = $false
|
|
||||||
$processInfo.RedirectStandardInput = $true
|
|
||||||
|
|
||||||
$process = New-Object System.Diagnostics.Process
|
|
||||||
$process.StartInfo = $processInfo
|
|
||||||
$process.Start() | Out-Null
|
|
||||||
|
|
||||||
# Continuously write commands to the standard input of the process
|
|
||||||
while (!$process.HasExited) {
|
|
||||||
Start-Sleep -Milliseconds 100
|
|
||||||
$process.StandardInput.WriteLine("list")
|
|
||||||
Start-Sleep -Milliseconds 100
|
|
||||||
$process.StandardInput.WriteLine("get 1")
|
|
||||||
Start-Sleep -Milliseconds 100
|
|
||||||
$process.StandardInput.WriteLine("get 25")
|
|
||||||
}
|
|
||||||
|
|
||||||
$process.WaitForExit()
|
|
Loading…
x
Reference in New Issue
Block a user