runtime library

Download and check of runtime files (ADR 001 D13): models and GPU packs.

This library has no Flutter and no build hook dependency. It uses dart:io, so web apps must import it conditionally.

Classes

RuntimeFile
A file that an app downloads after install: a model, or a GPU pack (ADR 001 D12, D13).

Functions

ensureRuntimeFile(RuntimeFile file, Directory directory, {HttpClient? client, void onProgress(int received, int? total)?}) → Future<File>
Makes <directory>/<file.name> a file with SHA-256 RuntimeFile.sha256 and returns it.

Exceptions / Errors

FetchException
A download or check failure.