1 USING: accessors alien.libraries kernel sequences system vocabs
3 IN: alien.libraries.finder
5 HOOK: find-library* os ( name -- path/f )
7 : find-library ( name -- path/library-not-found )
8 dup find-library* [ nip ] when* ;
10 : ?update-library ( name path abi -- )
11 pick lookup-library [ dll>> dll-valid? ] [ f ] if* [
14 [ find-library ] [ update-library ] bi*
17 ! Try to find the library from a list, but if it's not found,
18 ! try to open a library that is the first name in that list anyway
19 ! or "library_not_found" as a last resort for better debugging.
20 : find-library-from-list ( seq -- path/f )
21 [ [ find-library* ] map-find drop ]
22 [ ?first "library_not_found" or ] ?unless ;
24 "alien.libraries.finder." os name>> append require