Browser runtime adapter for FluxGPU - Workers, DOM integration, and canvas management
npm install @fluxgpu/host-browserbash
pnpm add @fluxgpu/host-browser
`
Usage
$3
`typescript
import { BrowserAdapter } from '@fluxgpu/host-browser';
const adapter = new BrowserAdapter();
// Initialize with canvas
await adapter.initialize(canvas);
// Send commands to worker
adapter.send(command);
// Handle responses
adapter.onMessage((response) => {
console.log('GPU response:', response);
});
`
Architecture Role
Part of the Infrastructure Layer, this package:
- Implements browser-specific ports defined in @fluxgpu/contracts`