This guide gets you running Geyser examples quickly.
All Platforms:
# Ensure Rust is installed
rustc --versionWindows:
- Install Vulkan SDK
Linux:
# Ubuntu/Debian
sudo apt install vulkan-tools libvulkan-dev
# Fedora
sudo dnf install vulkan-tools vulkan-loader-develmacOS:
- Xcode Command Line Tools:
xcode-select --install
git clone https://github.com/yourusername/geyser.git
cd geyser
cargo build --features vulkan,metalcargo run --example vulkan_to_vulkan --features vulkanWhat you'll see:
=== Geyser Vulkan to Vulkan Texture Sharing Example ===
Creating Vulkan Context 1...
✓ Context 1 created
App 1: Creating shareable texture...
✓ Texture created
- Width: 1024
- Height: 768
- Format: Rgba8Unorm
...
cargo run --example metal_to_metal --features metal# Windows/Linux
cargo run --example bevy_integration --features vulkan
# macOS
cargo run --example bevy_integration --features metalWhat you'll see:
- A window with animated RGB gradient pattern
- Console output showing initialization steps
use geyser::{
TextureShareManager,
TextureDescriptor, TextureFormat, TextureUsage,
};
// Create manager (platform-specific)
#[cfg(target_os = "windows")]
use geyser::vulkan::VulkanTextureShareManager;
let manager = VulkanTextureShareManager::new(
instance, device, physical_device, queue_family
)?;
// Define texture
let desc = TextureDescriptor {
width: 1920,
height: 1080,
format: TextureFormat::Rgba8Unorm,
usage: vec![
TextureUsage::RenderAttachment,
TextureUsage::TextureBinding,
],
label: Some("MyTexture".to_string()),
};
// Create it
let texture = manager.create_shareable_texture(&desc)?;// Export for sharing
let handle = manager.export_texture(texture.as_ref())?;
// Handle can now be:
// - Sent to another process via IPC
// - Passed to another API context
// - Serialized for storage// In another context/process
let imported = manager.import_texture(handle, &desc)?;
// Use the imported texture
println!("Imported: {}x{}", imported.width(), imported.height());// Release resources
manager.release_texture_handle(handle)?;
drop(texture);geyser/
├── src/
│ ├── lib.rs # Core traits
│ ├── common/mod.rs # Common types
│ ├── error.rs # Error handling
│ ├── vulkan/mod.rs # Vulkan backend
│ ├── metal/mod.rs # Metal backend
│ └── webgpu/mod.rs # WebGPU (stub)
├── examples/
│ ├── vulkan_to_vulkan.rs # Vulkan example
│ ├── metal_to_metal.rs # Metal example
│ ├── bevy_integration.rs # Bevy example
│ └── README.md # Examples guide
└── docs/
├── architecture.md # Architecture
├── PHASE1_SUMMARY.md # Implementation details
└── EXAMPLES_SUMMARY.md # Examples breakdown
// In src/common/mod.rs
pub enum TextureFormat {
Rgba8Unorm,
Bgra8Unorm,
R16Float,
R32Float,
MyNewFormat, // Add here
}
// Update backend mappings
// In src/vulkan/mod.rs
fn map_texture_format_to_vk(&self, format: TextureFormat) -> Result<vk::Format> {
match format {
// ...
TextureFormat::MyNewFormat => Ok(vk::Format::MY_FORMAT),
}
}# List all examples
ls examples/*.rs
# Run specific example
cargo run --example <name> --features <backend># View architecture
cat docs/architecture.md
# View Phase 1 summary
cat docs/PHASE1_SUMMARY.md
# View examples guide
cat examples/README.md# Check Vulkan installation
vulkaninfo
# Windows: Ensure Vulkan SDK is in PATH
# Linux: Install vulkan-loader# macOS only
# Check: System Preferences > Displays
# Ensure macOS 10.13+# Clean and rebuild
cargo clean
cargo build --features vulkan,metal
# Check feature flags
cargo build --features vulkan # or metal- Architecture: Read
docs/architecture.md - Examples: Study
examples/README.md - Phase 1: Review
docs/PHASE1_SUMMARY.md
- Pick an issue: Check GitHub Issues
- Read guidelines: See
CONTRIBUTING.md - Submit PR: Follow contribution workflow
- External Memory: Implement real Vulkan export/import
- Synchronization: Add cross-process sync primitives
- Cross-API: Bridge Vulkan ↔ Metal
- Performance: Add benchmarks
vulkan: Enable Vulkan backendmetal: Enable Metal backend (macOS only)webgpu: Enable WebGPU backend (future)
vulkan_to_vulkan: Vulkan sharingmetal_to_metal: Metal sharing (macOS)bevy_integration: Bevy integrationvulkan_to_metal: Cross-API (Phase 2)
- Windows: Vulkan via
ash - Linux: Vulkan via
ash - macOS: Metal via
metalcrate
- Main README:
README.md - Examples Guide:
examples/README.md - Architecture:
docs/architecture.md - Phase 1 Summary:
docs/PHASE1_SUMMARY.md - Project Status:
PROJECT_STATUS.md
Happy sharing! 🎉
For issues, questions, or contributions, visit the GitHub repository.