Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
libobs-bootstrapper
A utility crate for automatically downloading and installing OBS (Open Broadcaster Software) Studio binaries at runtime. This crate is part of the libobs-rs ecosystem and is designed to make distributing OBS-based applications easier by handling the setup of OBS binaries.
Note: This crate currently supports Windows and MacOS platforms. Refer to the libobs-wrapper documentation for Linux setup instructions here.
Features
- Automatic OBS Download: Downloads appropriate OBS binaries at runtime
- Progress Tracking: Built-in progress reporting for downloads and extraction
- Version Management: Handles OBS version checking and updates
- Custom Status Handlers: Flexible progress reporting via custom handlers
- Async Support: Built on Tokio for async operations
- Error Handling: Comprehensive error types for reliable error handling
Usage
Add the crate to your dependencies:
[]
= "0.1.0"
= "0.1" # For implementing the bootstrap status handler
Basic Example
Here's a simple example using the default console handler:
use ;
async
Custom Progress Handler
You can implement your own progress handler for custom UI integration:
use ;
use ObsBootstrapStatusHandler;
use ;
;
Setup Steps
-
You can either: a) RECOMMENDED enable the
install_dummy_dllfeature for this crate b) Add a placeholderobs.dllfile to your executable directory:- Download a dummy DLL from libobs-builds releases
- Use the version matching your target OBS version
- Rename the downloaded file to
obs.dll
-
Call
ObsBootstrapper::bootstrap()at application startup -
If
ObsBootstrapperResult::Restartis returned:- Exit the application
- The updater will restart your application automatically
Advanced Options
The ObsBootstrapperOptions struct allows you to customize the bootstrapper:
let options = default
.with_repository // Custom repo
.with_update // Force update check
.with_restart_after_update; // Auto restart
Error Handling
The crate provides the ObsBootstrapError enum for error handling:
GeneralError: Generic bootstrapper errorsDownloadError: Issues during OBS binary downloadExtractError: Problems extracting downloaded files
License
This project is licensed under the MIT License - see the LICENSE file for details.