From 7a6f45f05ac39b8d0c75f55c0be157bbd226cff9 Mon Sep 17 00:00:00 2001 From: Bedis Nbiba Date: Tue, 9 Apr 2024 10:07:08 +0100 Subject: [PATCH] chore: add helpful message when --unstable-ffi is not passed (#37) --- 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); }