Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

32
vendor/gilrs/examples/wasm/README.md vendored Normal file
View File

@@ -0,0 +1,32 @@
# Wasm Example
These are instructions for running the GUI example in your web browser using Wasm.
Currently only the GUI example is set up to run with Wasm.
### Ubuntu requirements
```bash
sudo apt install build-essential
sudo apt-get install libssl-dev pkg-config
```
### Setup
```pwsh
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli
cargo install basic-http-server
```
### Build and Run
Run these from the workspace root.
```pwsh
cargo build --release --example gui --target wasm32-unknown-unknown
wasm-bindgen --out-name wasm_example --out-dir gilrs/examples/wasm/target --target web target/wasm32-unknown-unknown/release/examples/gui.wasm
basic-http-server gilrs/examples/wasm
```
Now open your web browser and navigate to http://127.0.0.1:4000

34
vendor/gilrs/examples/wasm/index.html vendored Normal file
View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Gilrs Example</title>
<style>
html, body {
margin: 0;
/* prevent scroll bar from showing */
overflow: hidden;
/*
Egui automatically resizes the canvas to fit it's parent element so ensures the canvas will
resize to always be fullscreen.
*/
width: 100%;
height: 100%;
}
canvas {
/*
Egui adds these to the canvas automatically, but not until it gets focus,
causing it to grow until you click on it. This prevents that.
*/
position: absolute;
top: 0;
}
</style>
</head>
<script type="module">
import init from './target/wasm_example.js'
init()
</script>
<canvas id="canvas"></canvas>
</html>

14
vendor/gilrs/examples/wasm/wasm_gui.ps1 vendored Normal file
View File

@@ -0,0 +1,14 @@
### This script can be used instead of the "Build and Run" step in `./gilrs/examples/wasm/README.md`.
### Useful for gilrs devs that want a single script to to point their IDE to for run configurations.
### Supports Powershell 5 and up on Windows or Linux
### Make sure to run the install steps from the readme first.
# Start at this script's path and go up three levels to the workspace root.
# Ensures a consistent path regardless of the working directory when you run the script.
$Path = $PSScriptRoot | Split-Path | Split-Path | Split-Path
$ProjectDir = Resolve-Path $Path
Set-Location $ProjectDir
cargo build --release --example gui --target wasm32-unknown-unknown
wasm-bindgen --out-name wasm_example --out-dir gilrs/examples/wasm/target --target web target/wasm32-unknown-unknown/release/examples/gui.wasm
basic-http-server gilrs/examples/wasm

17
vendor/gilrs/examples/wasm/wasm_gui.sh vendored Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
### This script can be used instead of the "Build and Run" step in `./gilrs/examples/wasm/README.md`.
### Useful for gilrs devs that want a single script to to point their IDE to for run configurations.
### Make sure to run the install steps from the readme first.
set -e
# Start at this script's path and go up three levels to the workspace root.
# Ensures a consistent path regardless of the working directory when you run the script.
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_DIR=$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")
cd "$PROJECT_DIR" || exit
cargo build --release --example gui --target wasm32-unknown-unknown
wasm-bindgen --out-name wasm_example --out-dir gilrs/examples/wasm/target --target web target/wasm32-unknown-unknown/release/examples/gui.wasm
basic-http-server gilrs/examples/wasm