loadLiteRt method

  1. @override
Future<void> loadLiteRt({
  1. String? wasmPath,
})
override

Loads the LiteRT core WebAssembly runtime binaries.

wasmPath is the path (URL) to the directory containing WASM files.

Implementation

@override
Future<void> loadLiteRt({String? wasmPath}) async {
  if (!web.window.has('loadLiteRt')) {
    await _loadModuleScriptGeneral('https://cdn.jsdelivr.net/npm/@litertjs/core/+esm');
  }
  final wasmUrl = wasmPath ?? 'https://cdn.jsdelivr.net/npm/@litertjs/core/wasm/';
  await _jsLoadLiteRt(wasmUrl.toJS).toDart;
}