fuse-shared-library-win32 (Work in progress)
Install WinFsp (both Core
and Developer components), then...
npm install fuse-shared-library-win32
Usage
const winFspFuse = require('fuse-shared-library-win32')
console.log(winFspFuse.lib)
console.log(winFspFuse.include)
console.log(winFspFuse.bin)
console.log(winFspFuse.pthreads.lib)
console.log(winFspFuse.pthreads.include)
console.log(winFspFuse.pthreads.bin)
You should move the shared library next to your program after linking it
as that is where your binary will try and load it from.
Using a GYP file this can be done like this:
{
"targets": [{
"target_name": "fuse_example",
"include_dirs": [
# include it like this
"<!@(node -e \"require('fuse-shared-library-win32/include')\")"
],
"libraries": [
# link it like this
"<!@(node -e \"require('fuse-shared-library-win32/lib')\")"
],
"sources": [
"your_program.cc"
]
}, {
# setup a postinstall target that copies the shared library
# next to the produces node library
"target_name": "postinstall",
"type": "none",
"dependencies": ["fuse_example"],
"copies": [{
"destination": "build/Release",
# expanding a variable to a list here does not seem to work somehow (node-gyp 5.1.0)
"files": [
"<!(node -e \"console.log(require('fuse-shared-library-win32').bin)\")",
"<!(node -e \"console.log(require('fuse-shared-library-win32').pthreads.bin)\")"
],
}]
}]
}
License
MIT