Skip to content

Commit

Permalink
[major] Use the simdutf library
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Dec 20, 2022
1 parent 1e5e113 commit b721162
Show file tree
Hide file tree
Showing 8 changed files with 30,558 additions and 115 deletions.
27 changes: 23 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,29 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

This license applies to parts originating from
https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c:
This license applies to all parts of utf-8-validate that are not externally
maintained libraries.

The externally maintained simdutf library used by utf-8-validate, located at
deps/simdutf, is licensed as follows:

"""
Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> -- 2005-03-30
License: http://www.cl.cam.ac.uk/~mgk25/short-license.html
Copyright 2021 The simdutf authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
9 changes: 7 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
'targets': [
{
'target_name': 'validation',
'sources': ['src/validation.c'],
'cflags': ['-std=c99'],
'sources': [
'src/validation.cc',
'deps/simdutf/singleheader/simdutf.cpp'
],
'cflags_cc': ['-std=gnu++11'],
'include_dirs': ["<!(node -p \"require('node-addon-api').include_dir\")"],
'defines': ['NAPI_DISABLE_CPP_EXCEPTIONS'],
'conditions': [
["OS=='mac'", {
'xcode_settings': {
Expand Down
18 changes: 18 additions & 0 deletions deps/simdutf/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright 2021 The simdutf authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28,045 changes: 28,045 additions & 0 deletions deps/simdutf/singleheader/simdutf.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit b721162

Please sign in to comment.