| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1839,3 +1839,35 @@ The externally maintained libraries used by Node.js are: | |||
| 1839 | 1839 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | |
| 1840 | 1840 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 1841 | 1841 | """ | |
| 1842 | + | ||
| 1843 | + - base64, located at deps/base64/base64/, is licensed as follows: | ||
| 1844 | + """ | ||
| 1845 | + Copyright (c) 2005-2007, Nick Galbreath | ||
| 1846 | + Copyright (c) 2013-2019, Alfred Klomp | ||
| 1847 | + Copyright (c) 2015-2017, Wojciech Mula | ||
| 1848 | + Copyright (c) 2016-2017, Matthieu Darbois | ||
| 1849 | + All rights reserved. | ||
| 1850 | + | ||
| 1851 | + Redistribution and use in source and binary forms, with or without | ||
| 1852 | + modification, are permitted provided that the following conditions are | ||
| 1853 | + met: | ||
| 1854 | + | ||
| 1855 | + - Redistributions of source code must retain the above copyright notice, | ||
| 1856 | + this list of conditions and the following disclaimer. | ||
| 1857 | + | ||
| 1858 | + - Redistributions in binary form must reproduce the above copyright | ||
| 1859 | + notice, this list of conditions and the following disclaimer in the | ||
| 1860 | + documentation and/or other materials provided with the distribution. | ||
| 1861 | + | ||
| 1862 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 1863 | + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
| 1864 | + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
| 1865 | + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 1866 | + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 1867 | + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
| 1868 | + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 1869 | + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 1870 | + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 1871 | + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 1872 | + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 1873 | + """ | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,14 @@ | |||
| 1 | + # base64 | ||
| 2 | + | ||
| 3 | + This project boosts base64 encoding/decoding performance by utilizing SIMD | ||
| 4 | + operations where possible. | ||
| 5 | + | ||
| 6 | + The source is pulled from: https://github.com/aklomp/base64 | ||
| 7 | + | ||
| 8 | + Active development occurs in the default branch (currently named `master`). | ||
| 9 | + | ||
| 10 | + ## Updating | ||
| 11 | + | ||
| 12 | + ```sh | ||
| 13 | + $ git clone https://github.com/aklomp/base64 | ||
| 14 | + ``` | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,191 @@ | |||
| 1 | + { | ||
| 2 | + 'variables': { | ||
| 3 | + 'arm_fpu%': '', | ||
| 4 | + 'target_arch%': '', | ||
| 5 | + }, | ||
| 6 | + 'targets': [ | ||
| 7 | + { | ||
| 8 | + 'target_name': 'base64', | ||
| 9 | + 'type': 'static_library', | ||
| 10 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 11 | + 'direct_dependent_settings': { | ||
| 12 | + 'include_dirs': [ 'base64/include' ], | ||
| 13 | + 'defines': [ 'BASE64_STATIC_DEFINE' ], | ||
| 14 | + }, | ||
| 15 | + 'defines': [ 'BASE64_STATIC_DEFINE' ], | ||
| 16 | + 'sources': [ | ||
| 17 | + 'base64/include/libbase64.h', | ||
| 18 | + 'base64/lib/arch/generic/codec.c', | ||
| 19 | + 'base64/lib/tables/tables.c', | ||
| 20 | + 'base64/lib/codec_choose.c', | ||
| 21 | + 'base64/lib/codecs.h', | ||
| 22 | + 'base64/lib/lib.c', | ||
| 23 | + ], | ||
| 24 | + | ||
| 25 | + 'conditions': [ | ||
| 26 | + [ 'arm_fpu=="neon" and target_arch=="arm"', { | ||
| 27 | + 'defines': [ 'HAVE_NEON32=1' ], | ||
| 28 | + 'dependencies': [ 'base64_neon32' ], | ||
| 29 | + }, { | ||
| 30 | + 'sources': [ 'base64/lib/arch/neon32/codec.c' ], | ||
| 31 | + }], | ||
| 32 | + | ||
| 33 | + # arm64 requires NEON, so it's safe to always use it | ||
| 34 | + [ 'target_arch=="arm64"', { | ||
| 35 | + 'defines': [ 'HAVE_NEON64=1' ], | ||
| 36 | + 'dependencies': [ 'base64_neon64' ], | ||
| 37 | + }, { | ||
| 38 | + 'sources': [ 'base64/lib/arch/neon64/codec.c' ], | ||
| 39 | + }], | ||
| 40 | + | ||
| 41 | + # Runtime detection will happen for x86 CPUs | ||
| 42 | + [ 'target_arch in "ia32 x64 x32"', { | ||
| 43 | + 'defines': [ | ||
| 44 | + 'HAVE_SSSE3=1', | ||
| 45 | + 'HAVE_SSE41=1', | ||
| 46 | + 'HAVE_SSE42=1', | ||
| 47 | + 'HAVE_AVX=1', | ||
| 48 | + 'HAVE_AVX2=1', | ||
| 49 | + ], | ||
| 50 | + 'dependencies': [ | ||
| 51 | + 'base64_ssse3', | ||
| 52 | + 'base64_sse41', | ||
| 53 | + 'base64_sse42', | ||
| 54 | + 'base64_avx', | ||
| 55 | + 'base64_avx2', | ||
| 56 | + ], | ||
| 57 | + }, { | ||
| 58 | + 'sources': [ | ||
| 59 | + 'base64/lib/arch/ssse3/codec.c', | ||
| 60 | + 'base64/lib/arch/sse41/codec.c', | ||
| 61 | + 'base64/lib/arch/sse42/codec.c', | ||
| 62 | + 'base64/lib/arch/avx/codec.c', | ||
| 63 | + 'base64/lib/arch/avx2/codec.c', | ||
| 64 | + ], | ||
| 65 | + }], | ||
| 66 | + ], | ||
| 67 | + }, | ||
| 68 | + | ||
| 69 | + { | ||
| 70 | + 'target_name': 'base64_ssse3', | ||
| 71 | + 'type': 'static_library', | ||
| 72 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 73 | + 'sources': [ 'base64/lib/arch/ssse3/codec.c' ], | ||
| 74 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSSE3=1' ], | ||
| 75 | + 'conditions': [ | ||
| 76 | + [ 'OS!="win"', { | ||
| 77 | + 'cflags': [ '-mssse3' ], | ||
| 78 | + 'xcode_settings': { | ||
| 79 | + 'OTHER_CFLAGS': [ '-mssse3' ] | ||
| 80 | + }, | ||
| 81 | + }], | ||
| 82 | + ], | ||
| 83 | + }, | ||
| 84 | + | ||
| 85 | + { | ||
| 86 | + 'target_name': 'base64_sse41', | ||
| 87 | + 'type': 'static_library', | ||
| 88 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 89 | + 'sources': [ 'base64/lib/arch/sse41/codec.c' ], | ||
| 90 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSE41=1' ], | ||
| 91 | + 'conditions': [ | ||
| 92 | + [ 'OS!="win"', { | ||
| 93 | + 'cflags': [ '-msse4.1' ], | ||
| 94 | + 'xcode_settings': { | ||
| 95 | + 'OTHER_CFLAGS': [ '-msse4.1' ] | ||
| 96 | + }, | ||
| 97 | + }], | ||
| 98 | + ], | ||
| 99 | + }, | ||
| 100 | + | ||
| 101 | + { | ||
| 102 | + 'target_name': 'base64_sse42', | ||
| 103 | + 'type': 'static_library', | ||
| 104 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 105 | + 'sources': [ 'base64/lib/arch/sse42/codec.c' ], | ||
| 106 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_SSE42=1' ], | ||
| 107 | + 'conditions': [ | ||
| 108 | + [ 'OS!="win"', { | ||
| 109 | + 'cflags': [ '-msse4.2' ], | ||
| 110 | + 'xcode_settings': { | ||
| 111 | + 'OTHER_CFLAGS': [ '-msse4.2' ] | ||
| 112 | + }, | ||
| 113 | + }], | ||
| 114 | + ], | ||
| 115 | + }, | ||
| 116 | + | ||
| 117 | + { | ||
| 118 | + 'target_name': 'base64_avx', | ||
| 119 | + 'type': 'static_library', | ||
| 120 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 121 | + 'sources': [ 'base64/lib/arch/avx/codec.c' ], | ||
| 122 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX=1' ], | ||
| 123 | + 'conditions': [ | ||
| 124 | + [ 'OS!="win"', { | ||
| 125 | + 'cflags': [ '-mavx' ], | ||
| 126 | + 'xcode_settings': { | ||
| 127 | + 'OTHER_CFLAGS': [ '-mavx' ] | ||
| 128 | + }, | ||
| 129 | + }, { | ||
| 130 | + 'msvs_settings': { | ||
| 131 | + 'VCCLCompilerTool': { | ||
| 132 | + 'AdditionalOptions': [ | ||
| 133 | + '/arch:AVX' | ||
| 134 | + ], | ||
| 135 | + }, | ||
| 136 | + }, | ||
| 137 | + }], | ||
| 138 | + ], | ||
| 139 | + }, | ||
| 140 | + | ||
| 141 | + { | ||
| 142 | + 'target_name': 'base64_avx2', | ||
| 143 | + 'type': 'static_library', | ||
| 144 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 145 | + 'sources': [ 'base64/lib/arch/avx2/codec.c' ], | ||
| 146 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX2=1' ], | ||
| 147 | + 'conditions': [ | ||
| 148 | + [ 'OS!="win"', { | ||
| 149 | + 'cflags': [ '-mavx2' ], | ||
| 150 | + 'xcode_settings': { | ||
| 151 | + 'OTHER_CFLAGS': [ '-mavx2' ] | ||
| 152 | + }, | ||
| 153 | + }, { | ||
| 154 | + 'msvs_settings': { | ||
| 155 | + 'VCCLCompilerTool': { | ||
| 156 | + 'AdditionalOptions': [ | ||
| 157 | + '/arch:AVX2' | ||
| 158 | + ], | ||
| 159 | + }, | ||
| 160 | + }, | ||
| 161 | + }], | ||
| 162 | + ], | ||
| 163 | + }, | ||
| 164 | + | ||
| 165 | + { | ||
| 166 | + 'target_name': 'base64_neon32', | ||
| 167 | + 'type': 'static_library', | ||
| 168 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 169 | + 'sources': [ 'base64/lib/arch/neon32/codec.c' ], | ||
| 170 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_NEON32=1' ], | ||
| 171 | + 'conditions': [ | ||
| 172 | + [ 'OS!="win"', { | ||
| 173 | + 'cflags': [ '-mfpu=neon' ], | ||
| 174 | + 'xcode_settings': { | ||
| 175 | + 'OTHER_CFLAGS': [ '-mfpu=neon' ] | ||
| 176 | + }, | ||
| 177 | + }], | ||
| 178 | + ], | ||
| 179 | + }, | ||
| 180 | + | ||
| 181 | + { | ||
| 182 | + 'target_name': 'base64_neon64', | ||
| 183 | + 'type': 'static_library', | ||
| 184 | + 'include_dirs': [ 'base64/include', 'base64/lib' ], | ||
| 185 | + 'sources': [ 'base64/lib/arch/neon64/codec.c' ], | ||
| 186 | + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_NEON64=1' ], | ||
| 187 | + # NEON is required in arm64, so no -mfpu flag is needed | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + ] | ||
| 191 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,22 @@ | |||
| 1 | + # https://EditorConfig.org | ||
| 2 | + root = true | ||
| 3 | + | ||
| 4 | + [*] | ||
| 5 | + charset = utf-8 | ||
| 6 | + insert_final_newline = true | ||
| 7 | + trim_trailing_whitespace = true | ||
| 8 | + | ||
| 9 | + indent_style = tab | ||
| 10 | + tab_width = 8 | ||
| 11 | + indent_size = 8 | ||
| 12 | + | ||
| 13 | + [CMakeLists.txt] | ||
| 14 | + tab_width = 4 | ||
| 15 | + indent_style = space | ||
| 16 | + [*.cmake] | ||
| 17 | + tab_width = 4 | ||
| 18 | + indent_style = space | ||
| 19 | + | ||
| 20 | + [*.py] | ||
| 21 | + tab_width = 4 | ||
| 22 | + indent_style = space | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,133 @@ | |||
| 1 | + name: Test | ||
| 2 | + | ||
| 3 | + on: [push, pull_request] | ||
| 4 | + | ||
| 5 | + jobs: | ||
| 6 | + makefile-test: | ||
| 7 | + name: makefile-${{ matrix.runner }}-amd64-${{ matrix.compiler }} ${{ ((matrix.openmp == 1) && '+openmp') || '' }} | ||
| 8 | + runs-on: ${{ matrix.runner }} | ||
| 9 | + strategy: | ||
| 10 | + fail-fast: false | ||
| 11 | + matrix: | ||
| 12 | + runner: ["ubuntu-18.04"] | ||
| 13 | + compiler: ["gcc", "clang"] | ||
| 14 | + openmp: ["0", "1"] | ||
| 15 | + include: | ||
| 16 | + - runner: "macos-11" | ||
| 17 | + compiler: "clang" | ||
| 18 | + openmp: "0" | ||
| 19 | + env: | ||
| 20 | + OPENMP: ${{ matrix.openmp }} | ||
| 21 | + OMP_NUM_THREADS: ${{ ((matrix.openmp == 1) && '2') || '0' }} | ||
| 22 | + CC: ${{ matrix.compiler }} | ||
| 23 | + OBJCOPY: ${{ (startsWith(matrix.runner, 'macos') && 'echo') || 'objcopy' }} | ||
| 24 | + steps: | ||
| 25 | + - name: Checkout | ||
| 26 | + uses: actions/checkout@v3 | ||
| 27 | + - name: Run tests | ||
| 28 | + run: ./test/ci/test.sh | ||
| 29 | + | ||
| 30 | + cmake-test: | ||
| 31 | + name: cmake-${{ matrix.runner }} | ||
| 32 | + runs-on: ${{ matrix.runner }} | ||
| 33 | + strategy: | ||
| 34 | + fail-fast: false | ||
| 35 | + matrix: | ||
| 36 | + runner: ["ubuntu-18.04", "macos-11", "windows-2019"] | ||
| 37 | + steps: | ||
| 38 | + - name: Checkout | ||
| 39 | + uses: actions/checkout@v3 | ||
| 40 | + - name: CMake Configure | ||
| 41 | + run: > | ||
| 42 | + cmake | ||
| 43 | + -B out | ||
| 44 | + -Werror=dev | ||
| 45 | + -DBASE64_BUILD_TESTS=ON | ||
| 46 | + ${{ runner.os != 'Windows' && '-DCMAKE_BUILD_TYPE=Release' || '' }} | ||
| 47 | + ${{ runner.os == 'macOS' && '-DBASE64_WITH_AVX2=OFF' || '' }} | ||
| 48 | + - name: CMake Build | ||
| 49 | + run: cmake --build out --config Release --verbose | ||
| 50 | + - name: CTest | ||
| 51 | + run: ctest --no-tests=error --test-dir out -VV --build-config Release | ||
| 52 | + | ||
| 53 | + alpine-makefile-test: | ||
| 54 | + name: makefile-alpine-amd64-gcc | ||
| 55 | + runs-on: ubuntu-latest | ||
| 56 | + container: | ||
| 57 | + image: alpine:3.12 | ||
| 58 | + env: | ||
| 59 | + CC: gcc | ||
| 60 | + steps: | ||
| 61 | + - name: Install deps | ||
| 62 | + run: apk add --update bash build-base git | ||
| 63 | + - name: Checkout | ||
| 64 | + uses: actions/checkout@v3 | ||
| 65 | + - name: Run tests | ||
| 66 | + run: ./test/ci/test.sh | ||
| 67 | + | ||
| 68 | + alpine-cmake-test: | ||
| 69 | + name: cmake-alpine-amd64-gcc | ||
| 70 | + runs-on: ubuntu-latest | ||
| 71 | + container: | ||
| 72 | + image: alpine:3.12 | ||
| 73 | + steps: | ||
| 74 | + - name: Install deps | ||
| 75 | + run: apk add --update bash build-base cmake git | ||
| 76 | + - name: Checkout | ||
| 77 | + uses: actions/checkout@v3 | ||
| 78 | + - name: CMake Configure | ||
| 79 | + run: cmake -B out -Werror=dev -DBASE64_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release | ||
| 80 | + - name: CMake Build | ||
| 81 | + run: cmake --build out --config Release --verbose | ||
| 82 | + - name: CTest | ||
| 83 | + run: ctest --no-tests=error -VV --build-config Release | ||
| 84 | + working-directory: ./out | ||
| 85 | + | ||
| 86 | + alpine-alt-arch-makefile-test: | ||
| 87 | + name: makefile-alpine-${{matrix.arch}}-${{matrix.cc}} | ||
| 88 | + runs-on: ubuntu-latest | ||
| 89 | + strategy: | ||
| 90 | + fail-fast: false | ||
| 91 | + matrix: | ||
| 92 | + arch: [armv7, aarch64, s390x, ppc64le] | ||
| 93 | + cc: [gcc, clang] | ||
| 94 | + steps: | ||
| 95 | + - name: Checkout | ||
| 96 | + uses: actions/checkout@v3 | ||
| 97 | + - uses: uraimo/run-on-arch-action@v2 | ||
| 98 | + with: | ||
| 99 | + arch: ${{matrix.arch}} | ||
| 100 | + distro: alpine_latest | ||
| 101 | + env: | | ||
| 102 | + CC: ${{matrix.cc}} | ||
| 103 | + install: apk add --update bash build-base cmake git ${{matrix.cc}} | ||
| 104 | + run: ./test/ci/test.sh | ||
| 105 | + | ||
| 106 | + alpine-alt-arch-cmake-test: | ||
| 107 | + name: cmake-alpine-${{matrix.arch}}-${{matrix.cc}} | ||
| 108 | + runs-on: ubuntu-latest | ||
| 109 | + strategy: | ||
| 110 | + fail-fast: false | ||
| 111 | + matrix: | ||
| 112 | + arch: [armv7, aarch64, s390x, ppc64le] | ||
| 113 | + cc: [gcc, clang] | ||
| 114 | + steps: | ||
| 115 | + - name: Checkout | ||
| 116 | + uses: actions/checkout@v3 | ||
| 117 | + - uses: uraimo/run-on-arch-action@v2 | ||
| 118 | + with: | ||
| 119 | + arch: ${{matrix.arch}} | ||
| 120 | + distro: alpine_latest | ||
| 121 | + env: | | ||
| 122 | + CC: ${{matrix.cc}} | ||
| 123 | + install: apk add --update bash build-base cmake git ${{matrix.cc}} | ||
| 124 | + run: | | ||
| 125 | + echo "::group::CMake Configure" | ||
| 126 | + cmake -B out -Werror=dev -DBASE64_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release | ||
| 127 | + echo "::endgroup::CMake Configure" | ||
| 128 | + echo "::group::CMake Build" | ||
| 129 | + cmake --build out --config Release --verbose | ||
| 130 | + echo "::endgroup::CMake Build" | ||
| 131 | + echo "::group::CTest" | ||
| 132 | + ctest --no-tests=error --test-dir out -VV --build-config Release | ||
| 133 | + echo "::endgroup::CTest" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments