Skip to content

Commit b721162

Browse files
committed
[major] Use the simdutf library
1 parent 1e5e113 commit b721162

File tree

8 files changed

+30558
-115
lines changed

8 files changed

+30558
-115
lines changed

LICENSE

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,29 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2323
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
"""
2525

26-
This license applies to parts originating from
27-
https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c:
26+
This license applies to all parts of utf-8-validate that are not externally
27+
maintained libraries.
28+
29+
The externally maintained simdutf library used by utf-8-validate, located at
30+
deps/simdutf, is licensed as follows:
2831

2932
"""
30-
Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> -- 2005-03-30
31-
License: http://www.cl.cam.ac.uk/~mgk25/short-license.html
33+
Copyright 2021 The simdutf authors
34+
35+
Permission is hereby granted, free of charge, to any person obtaining a copy of
36+
this software and associated documentation files (the "Software"), to deal in
37+
the Software without restriction, including without limitation the rights to
38+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
39+
the Software, and to permit persons to whom the Software is furnished to do so,
40+
subject to the following conditions:
41+
42+
The above copyright notice and this permission notice shall be included in all
43+
copies or substantial portions of the Software.
44+
45+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
46+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
47+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
48+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
49+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
50+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3251
"""

binding.gyp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
'targets': [
33
{
44
'target_name': 'validation',
5-
'sources': ['src/validation.c'],
6-
'cflags': ['-std=c99'],
5+
'sources': [
6+
'src/validation.cc',
7+
'deps/simdutf/singleheader/simdutf.cpp'
8+
],
9+
'cflags_cc': ['-std=gnu++11'],
10+
'include_dirs': ["<!(node -p \"require('node-addon-api').include_dir\")"],
11+
'defines': ['NAPI_DISABLE_CPP_EXCEPTIONS'],
712
'conditions': [
813
["OS=='mac'", {
914
'xcode_settings': {

deps/simdutf/LICENSE-MIT

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Copyright 2021 The simdutf authors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
the Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

deps/simdutf/singleheader/simdutf.cpp

Lines changed: 28045 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)