docs(sfu): reflect shipped-in-package binary in BinaryManager + README
Follow-up to shipping rust/dist/: the resolution-order docblock and the README "backend-hosted rooms" section said the binary is downloaded on first use — it's now committed in the package and resolved locally (download is the fallback). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9af8281518
commit
e9be03d506
|
|
@ -132,7 +132,7 @@ Mesh is fine for two browsers; for **hosted rooms** — server in the media path
|
|||
WEBRTC_MEDIA_ENGINE="Blax\WebRtc\Media\RustMediaEngine"
|
||||
```
|
||||
|
||||
That's the whole setup — it is **plug-and-play**. On first use the engine downloads the prebuilt, sha256-verified `blax-webrtc-sfu` static binary for your platform (the RoadRunner pattern) and spawns it detached, flock-guarded so concurrent workers race exactly one spawn. Explicit control when you want it:
|
||||
That's the whole setup — it is **plug-and-play**. The prebuilt, sha256-verified `blax-webrtc-sfu` static binary is **shipped inside the package** (`rust/dist/`), so `composer require`/`update` alone gives you a working sidecar — no download step, no release to chase. The engine spawns it detached on first use, flock-guarded so concurrent workers race exactly one spawn. (For a platform not committed to `rust/dist/`, it falls back to downloading a sha256-verified release.) Explicit control when you want it:
|
||||
|
||||
```bash
|
||||
php artisan webrtc:install # pre-download the binary (deploy step)
|
||||
|
|
|
|||
|
|
@ -5,15 +5,17 @@ declare(strict_types=1);
|
|||
namespace Blax\WebRtc\Media\Rust;
|
||||
|
||||
/**
|
||||
* Locates — and, plug-and-play, downloads — the prebuilt `blax-webrtc-sfu`
|
||||
* static binary (the RoadRunner pattern: composer ships the PHP, the release
|
||||
* ships the binary, this class marries them).
|
||||
* Locates the prebuilt `blax-webrtc-sfu` static binary. Plug-and-play: the
|
||||
* binary is SHIPPED inside the package (rust/dist/, committed), so a plain
|
||||
* `composer require`/`update` gets a working sidecar with no download step —
|
||||
* download is only a last-resort fallback for uncommitted platforms.
|
||||
*
|
||||
* Resolution order:
|
||||
* 1. an explicit `webrtc.sfu.binary` path,
|
||||
* 2. a local dev build under the package's rust/target/{release,debug},
|
||||
* 3. the installed download for this package version + platform,
|
||||
* 4. (when auto_install) download from `webrtc.sfu.download_url`, verify the
|
||||
* 3. the SHIPPED binary rust/dist/blax-webrtc-sfu-<platform> (committed),
|
||||
* 4. a previously installed download for this package version + platform,
|
||||
* 5. (when auto_install) download from `webrtc.sfu.download_url`, verify the
|
||||
* sha256 from `webrtc.sfu.checksum_url`, install atomically.
|
||||
*/
|
||||
class BinaryManager
|
||||
|
|
|
|||
Loading…
Reference in New Issue