Skip to content

Commit

Permalink
feat: Remove NAN and use NAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Jan 12, 2024
1 parent e30a91f commit 5fab15a
Show file tree
Hide file tree
Showing 37 changed files with 6,408 additions and 5,474 deletions.
69 changes: 16 additions & 53 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,56 +1,19 @@

{
"variables": {
},
"targets": [
{
"include_dirs": [
"<!(node -e \"require(\'nan\')\")",
"includes"
],
'cflags!': ['-fno-exceptions'],
'cflags_cc!': ['-fno-exceptions'],
"target_name": "pkcs11",
"sources": [
"src/main.cpp",
"src/dl.cpp",
"src/const.cpp",
"src/pkcs11/error.cpp",
"src/pkcs11/v8_convert.cpp",
"src/pkcs11/template.cpp",
"src/pkcs11/mech.cpp",
"src/pkcs11/param.cpp",
"src/pkcs11/param_aes.cpp",
"src/pkcs11/param_rsa.cpp",
"src/pkcs11/param_ecdh.cpp",
"src/pkcs11/pkcs11.cpp",
"src/async.cpp",
"src/node.cpp"
],
'conditions': [
[
'OS=="mac"', {
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['-std=c++14', '-stdlib=libc++', '-v'],
'OTHER_CFLAGS': ['-ObjC++'],
'OTHER_LDFLAGS': ['-stdlib=libc++'],
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
},
'libraries': [
'-lobjc'
],
},
'OS == "win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1,
'AdditionalOptions': [ '-std:c++17', ],
}
}
}
]
]
}
]
"targets": [
{
"target_name": "pkcs11",
"sources": [
"src/dl.cpp",
"src/common.cpp",
"src/main.cpp" ,
],
"include_dirs": [
"includes",
],
"defines": [
"NAPI_DISABLE_CPP_EXCEPTIONS",
],
}
]
}
Loading

0 comments on commit 5fab15a

Please sign in to comment.