Currently, the default prefix is /usr/local on all platforms. On Windows, there is no clear equivalent of /usr/local/lib or /usr/local/lib. Here are some options:
C:\Program Files\Extism: Requires Admin privileges, not part of PATH by default
%LOCALAPPDATA\Extism: (i.e. C:\Users\mo\AppData\Local\Extism): not part of PATH by default
.
In the end, I settled on having . as the default option because the user probably wants to install it in a folder that is included in PATH, and if they didn't specify anything, the CLI should install in a predictable location. However, I don't have any strong opinions here
Current behavior:
PS D:\x\cli> extism lib install
Installing v0.5.5 to /usr/local
Fetching https://github.com/extism/extism/releases/download/v0.5.5/libextism-x86_64-pc-windows-msvc-v0.5.5.tar.gz
Copying extism.dll to \usr\local\lib\extism.dll
Copying extism.h to \usr\local\include\extism.h
PS D:\x\cli> cd d:\usr\local\lib\
PS D:\usr\local\lib> ls
Directory: D:\usr\local\lib
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/30/2023 4:41 PM 13258240 extism.dll
Note how it got installed in D:\usr\local\lib which is not what a Windows user expects.
New behavior:
PS D:\dylibso\cli\extism> go run main.go lib install
Installing v0.5.5 to .
Fetching https://github.com/extism/extism/releases/download/v0.5.5/libextism-x86_64-pc-windows-msvc-v0.5.5.tar.gz
Copying extism.dll to lib\extism.dll
Copying extism.h to include\extism.h
PS D:\dylibso\cli\extism> cd .\lib\
PS D:\dylibso\cli\extism\lib> ls
Directory: D:\dylibso\cli\extism\lib
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 11/30/2023 4:43 PM 13258240 extism.dll
I thinks this makes the CLI much more predictable on Windows
Currently, the default
prefix
is/usr/local
on all platforms. On Windows, there is no clear equivalent of/usr/local/lib
or/usr/local/lib
. Here are some options:C:\Program Files\Extism
: Requires Admin privileges, not part ofPATH
by default%LOCALAPPDATA\Extism
: (i.e. C:\Users\mo\AppData\Local\Extism): not part ofPATH
by default.
In the end, I settled on having
.
as the default option because the user probably wants to install it in a folder that is included inPATH
, and if they didn't specify anything, the CLI should install in a predictable location. However, I don't have any strong opinions hereCurrent behavior:
Note how it got installed in
D:\usr\local\lib
which is not what a Windows user expects.New behavior:
I thinks this makes the CLI much more predictable on Windows