From 5e3b7f2fc5a241b55d448686640aa801711bc386 Mon Sep 17 00:00:00 2001 From: Nbiba Bedis Date: Wed, 3 Apr 2024 12:32:42 +0100 Subject: [PATCH] chore: add helpful message when --unstable-ffi is not passed --- mod.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod.ts b/mod.ts index 2a5219a..9386d7b 100644 --- a/mod.ts +++ b/mod.ts @@ -151,6 +151,9 @@ export async function dlopen( options: FetchOptions, symbols: Const, ): Promise> { + if (Deno.dlopen === undefined) { + throw new Error("`--unstable-ffi` is required"); + } // deno-lint-ignore no-explicit-any return Deno.dlopen(await download(options), symbols as any); }