justjit 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,207 @@
1
+ name: Build and Publish Wheels
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ['v*']
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+ release:
11
+ types: [published]
12
+
13
+ env:
14
+ # Using conda-forge llvmdev 18.1.8 for static linking
15
+ LLVM_VERSION: "18.1.8"
16
+
17
+ jobs:
18
+ build_wheels:
19
+ name: Build wheels on ${{ matrix.os }}
20
+ runs-on: ${{ matrix.os }}
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ include:
25
+ - os: ubuntu-latest
26
+ arch: x86_64
27
+ - os: macos-13
28
+ arch: x86_64
29
+ - os: macos-14
30
+ arch: arm64
31
+ - os: windows-latest
32
+ arch: AMD64
33
+
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ with:
37
+ submodules: recursive
38
+
39
+ - name: Set up Python
40
+ uses: actions/setup-python@v5
41
+ with:
42
+ python-version: '3.12'
43
+
44
+ # ===== Build Wheels (Linux) =====
45
+ # Uses system LLVM from EPEL/CRB for manylinux_2_28 ABI compatibility
46
+ - name: Build wheels (Linux)
47
+ if: runner.os == 'Linux'
48
+ uses: pypa/cibuildwheel@v2.21
49
+ env:
50
+ CIBW_BUILD: "cp311-* cp312-* cp313-*"
51
+ CIBW_SKIP: "*-musllinux_* *-win32 *-manylinux_i686"
52
+ CIBW_ARCHS: ${{ matrix.arch }}
53
+ CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
54
+ CIBW_BEFORE_ALL_LINUX: |
55
+ set -ex
56
+ # Install LLVM development packages from EPEL/CRB for manylinux_2_28 compatibility
57
+ # We can't use conda-forge llvmdev as it brings newer GLIBC symbols that auditwheel rejects
58
+ dnf install -y epel-release || true
59
+ dnf config-manager --set-enabled crb || dnf config-manager --set-enabled powertools || true
60
+ dnf install -y llvm-devel llvm-static clang-devel zlib-devel libxml2-devel libffi-devel cmake ninja-build || true
61
+ # Verify LLVM installation
62
+ llvm-config --version || echo "llvm-config not found"
63
+ ls -la /usr/lib64/cmake/llvm/ || ls -la /usr/lib/cmake/llvm/ || true
64
+ CIBW_ENVIRONMENT_LINUX: >-
65
+ LLVM_DIR=/usr/lib64/cmake/llvm
66
+ CMAKE_PREFIX_PATH=/usr
67
+ CIBW_BEFORE_BUILD: "pip install nanobind scikit-build-core cmake ninja"
68
+ CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair --plat manylinux_2_28_x86_64 -w {dest_dir} {wheel}"
69
+ CIBW_TEST_COMMAND: ""
70
+ CIBW_BUILD_VERBOSITY: 3
71
+
72
+ # ===== Build Wheels (macOS) =====
73
+ # Use setup-miniconda for cleaner conda management
74
+ - name: Setup Miniconda (macOS)
75
+ if: runner.os == 'macOS'
76
+ uses: conda-incubator/setup-miniconda@v3
77
+ with:
78
+ auto-update-conda: true
79
+ auto-activate-base: true
80
+ activate-environment: ""
81
+ channels: conda-forge
82
+ channel-priority: strict
83
+
84
+ - name: Install LLVM via conda-forge (macOS)
85
+ if: runner.os == 'macOS'
86
+ shell: bash -el {0}
87
+ run: |
88
+ conda install -y llvmdev=18.1.8 zlib libxml2
89
+ echo "LLVM_DIR=$CONDA_PREFIX/lib/cmake/llvm" >> $GITHUB_ENV
90
+ echo "CMAKE_PREFIX_PATH=$CONDA_PREFIX" >> $GITHUB_ENV
91
+ echo "CONDA_PREFIX_PATH=$CONDA_PREFIX" >> $GITHUB_ENV
92
+ # Verify
93
+ ls -la "$CONDA_PREFIX/lib/cmake/llvm/"
94
+
95
+ - name: Build wheels (macOS)
96
+ if: runner.os == 'macOS'
97
+ uses: pypa/cibuildwheel@v2.21
98
+ env:
99
+ CIBW_BUILD: "cp311-* cp312-* cp313-*"
100
+ CIBW_SKIP: "*-musllinux_* *-win32 *-manylinux_i686"
101
+ CIBW_ARCHS: ${{ matrix.arch }}
102
+ CIBW_ENVIRONMENT: >
103
+ LLVM_DIR=${{ env.LLVM_DIR }}
104
+ CMAKE_PREFIX_PATH=${{ env.CMAKE_PREFIX_PATH }}
105
+ MACOSX_DEPLOYMENT_TARGET=11.0
106
+ CIBW_BEFORE_BUILD: "pip install nanobind scikit-build-core cmake ninja"
107
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
108
+ CIBW_TEST_COMMAND: ""
109
+ CIBW_BUILD_VERBOSITY: 3
110
+
111
+ # ===== Build Wheels (Windows) =====
112
+ # Use setup-miniconda for cleaner conda management
113
+ - name: Setup Miniconda (Windows)
114
+ if: runner.os == 'Windows'
115
+ uses: conda-incubator/setup-miniconda@v3
116
+ with:
117
+ auto-update-conda: true
118
+ auto-activate-base: true
119
+ activate-environment: ""
120
+ channels: conda-forge
121
+ channel-priority: strict
122
+
123
+ - name: Setup Visual Studio environment (Windows)
124
+ if: runner.os == 'Windows'
125
+ uses: ilammy/msvc-dev-cmd@v1
126
+ with:
127
+ arch: x64
128
+
129
+ - name: Install LLVM via conda-forge (Windows)
130
+ if: runner.os == 'Windows'
131
+ shell: pwsh
132
+ run: |
133
+ conda install -y llvmdev=18.1.8 zlib libxml2
134
+ # On Windows, conda installs to $env:CONDA_PREFIX\Library
135
+ # Use forward slashes for CMake compatibility
136
+ $llvmDir = "$env:CONDA_PREFIX/Library/lib/cmake/llvm" -replace '\\', '/'
137
+ $prefixPath = "$env:CONDA_PREFIX/Library" -replace '\\', '/'
138
+ echo "LLVM_DIR=$llvmDir" >> $env:GITHUB_ENV
139
+ echo "CMAKE_PREFIX_PATH=$prefixPath" >> $env:GITHUB_ENV
140
+ # Verify
141
+ Get-ChildItem "$env:CONDA_PREFIX\Library\lib\cmake\llvm"
142
+
143
+ - name: Build wheels (Windows)
144
+ if: runner.os == 'Windows'
145
+ uses: pypa/cibuildwheel@v2.21
146
+ env:
147
+ CIBW_BUILD: "cp311-* cp312-* cp313-*"
148
+ CIBW_SKIP: "*-win32"
149
+ CIBW_ARCHS: ${{ matrix.arch }}
150
+ CIBW_ENVIRONMENT: >
151
+ LLVM_DIR=${{ env.LLVM_DIR }}
152
+ CMAKE_PREFIX_PATH=${{ env.CMAKE_PREFIX_PATH }}
153
+ CIBW_BEFORE_BUILD: "pip install nanobind scikit-build-core cmake ninja delvewheel"
154
+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: ""
155
+ CIBW_TEST_COMMAND: ""
156
+ CIBW_BUILD_VERBOSITY: 3
157
+
158
+ - name: Upload wheels
159
+ uses: actions/upload-artifact@v4
160
+ with:
161
+ name: wheels-${{ matrix.os }}-${{ matrix.arch }}
162
+ path: ./wheelhouse/*.whl
163
+
164
+ build_sdist:
165
+ name: Build source distribution
166
+ runs-on: ubuntu-latest
167
+ steps:
168
+ - uses: actions/checkout@v4
169
+ with:
170
+ submodules: recursive
171
+
172
+ - name: Build SDist
173
+ run: pipx run build --sdist
174
+
175
+ - name: Upload SDist
176
+ uses: actions/upload-artifact@v4
177
+ with:
178
+ name: sdist
179
+ path: dist/*.tar.gz
180
+
181
+ publish:
182
+ name: Publish to PyPI
183
+ needs: [build_wheels, build_sdist]
184
+ runs-on: ubuntu-latest
185
+ # Publish on push to main or on release
186
+ if: github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'published')
187
+
188
+ permissions:
189
+ id-token: write # For trusted publishing
190
+
191
+ steps:
192
+ - uses: actions/download-artifact@v4
193
+ with:
194
+ pattern: wheels-*
195
+ merge-multiple: true
196
+ path: dist
197
+
198
+ - uses: actions/download-artifact@v4
199
+ with:
200
+ name: sdist
201
+ path: dist
202
+
203
+ - name: Publish to PyPI
204
+ uses: pypa/gh-action-pypi-publish@release/v1
205
+ with:
206
+ password: ${{ secrets.PYPI_API_TOKEN }}
207
+ skip-existing: true # Don't fail if version already exists
@@ -0,0 +1,61 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+ venv/
12
+ env/
13
+ build/
14
+ # CMake
15
+ CMakeCache.txt
16
+ CMakeFiles/
17
+ cmake_install.cmake
18
+ Makefile
19
+ *.cmake
20
+ !CMakeLists.txt
21
+
22
+ # Build artifacts
23
+ *.so
24
+ *.pyd
25
+ *.dll
26
+ *.dylib
27
+ *.a
28
+ *.lib
29
+ *.exp
30
+ *.obj
31
+ *.o
32
+
33
+ # IDE
34
+ .vscode/
35
+ .idea/
36
+ *.swp
37
+ *.swo
38
+ *~
39
+
40
+ # OS
41
+ .DS_Store
42
+ Thumbs.db
43
+
44
+ # Generated bindings
45
+ src/justjit/_core.*
46
+
47
+ # Test outputs
48
+ *.pyc
49
+ test_*.py
50
+ check_*.py
51
+ debug_*.py
52
+ verify_*.py
53
+ analyze_*.py
54
+ decode_*.py
55
+ get_*.py
56
+ map_*.py
57
+ trace_*.py
58
+ quick_test.py
59
+
60
+ #uv-files
61
+ uv.lock
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,162 @@
1
+ cmake_minimum_required(VERSION 3.20)
2
+ project(justjit)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
7
+
8
+ # Find Python
9
+ if (CMAKE_VERSION VERSION_LESS 3.18)
10
+ set(DEV_MODULE Development)
11
+ else()
12
+ set(DEV_MODULE Development.Module)
13
+ endif()
14
+ find_package(Python 3.8 COMPONENTS Interpreter ${DEV_MODULE} REQUIRED)
15
+
16
+ # Find nanobind
17
+ execute_process(
18
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
19
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
20
+ find_package(nanobind CONFIG REQUIRED)
21
+
22
+ # LLVM configuration
23
+ # Users should set LLVM_DIR to their LLVM installation
24
+ # Example: cmake -DLLVM_DIR=/path/to/llvm/build/lib/cmake/llvm ..
25
+
26
+ # Force static LLVM linking for standalone wheels
27
+ set(LLVM_LINK_LLVM_DYLIB OFF CACHE BOOL "Link against static LLVM libraries" FORCE)
28
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libraries" FORCE)
29
+
30
+ find_package(LLVM REQUIRED CONFIG)
31
+
32
+ # LLVM paths from find_package
33
+ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
34
+ message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
35
+ message(STATUS "LLVM library dir: ${LLVM_LIBRARY_DIRS}")
36
+
37
+ include_directories(${LLVM_INCLUDE_DIRS})
38
+ link_directories(${LLVM_LIBRARY_DIRS})
39
+
40
+ # zlib (optional, needed on some platforms)
41
+ find_package(ZLIB)
42
+
43
+ # LLVM definitions
44
+ add_definitions(
45
+ -D_CRT_SECURE_NO_DEPRECATE
46
+ -D_CRT_SECURE_NO_WARNINGS
47
+ -D_CRT_NONSTDC_NO_DEPRECATE
48
+ -D_CRT_NONSTDC_NO_WARNINGS
49
+ -D_SCL_SECURE_NO_DEPRECATE
50
+ -D_SCL_SECURE_NO_WARNINGS
51
+ -DUNICODE
52
+ -D_UNICODE
53
+ -D__STDC_CONSTANT_MACROS
54
+ -D__STDC_FORMAT_MACROS
55
+ -D__STDC_LIMIT_MACROS
56
+ )
57
+
58
+ # Create extension module
59
+ nanobind_add_module(_core NB_STATIC NOMINSIZE
60
+ src/jit_core.cpp
61
+ src/bindings.cpp
62
+ )
63
+
64
+ # Use LLVM's llvm_map_components_to_libnames to get the right libraries
65
+ # This handles version differences and platform specifics automatically
66
+ llvm_map_components_to_libnames(LLVM_LIBS
67
+ Core
68
+ Support
69
+ ExecutionEngine
70
+ OrcJIT
71
+ MCJIT
72
+ RuntimeDyld
73
+ native
74
+ Passes
75
+ IRReader
76
+ AsmParser
77
+ Linker
78
+ ipo
79
+ Instrumentation
80
+ ScalarOpts
81
+ InstCombine
82
+ TransformUtils
83
+ Analysis
84
+ Object
85
+ MC
86
+ MCParser
87
+ MCDisassembler
88
+ BitReader
89
+ BitWriter
90
+ Target
91
+ CodeGen
92
+ SelectionDAG
93
+ AsmPrinter
94
+ GlobalISel
95
+ Demangle
96
+ BinaryFormat
97
+ Remarks
98
+ BitstreamReader
99
+ ProfileData
100
+ AggressiveInstCombine
101
+ Vectorize
102
+ CFGuard
103
+ )
104
+
105
+ message(STATUS "LLVM libraries: ${LLVM_LIBS}")
106
+
107
+ # Filter out any DIA SDK related libraries before linking (Windows-specific)
108
+ if(WIN32)
109
+ list(FILTER LLVM_LIBS EXCLUDE REGEX "diaguids")
110
+ list(FILTER LLVM_LIBS EXCLUDE REGEX "DebugInfoPDB")
111
+ message(STATUS "LLVM libraries after filtering (Windows): ${LLVM_LIBS}")
112
+ endif()
113
+
114
+ # Link LLVM libraries
115
+ target_link_libraries(_core PRIVATE ${LLVM_LIBS})
116
+
117
+ # Add zlib if found
118
+ if(ZLIB_FOUND)
119
+ target_link_libraries(_core PRIVATE ${ZLIB_LIBRARIES})
120
+ endif()
121
+
122
+ # Platform-specific libraries
123
+ if(WIN32)
124
+ # Disable debug symbols to avoid DIA SDK dependency
125
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG:NONE")
126
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:NONE")
127
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /DEBUG:NONE")
128
+
129
+ target_link_libraries(_core PRIVATE
130
+ psapi
131
+ shell32
132
+ ole32
133
+ uuid
134
+ advapi32
135
+ ws2_32
136
+ )
137
+ elseif(UNIX AND NOT APPLE)
138
+ # Linux system libraries needed by LLVM
139
+ find_package(Threads REQUIRED)
140
+ target_link_libraries(_core PRIVATE
141
+ Threads::Threads
142
+ ${CMAKE_DL_LIBS}
143
+ rt
144
+ m
145
+ )
146
+ # tinfo/ncurses is optional - some LLVM builds need it, some don't
147
+ find_library(TINFO_LIBRARY NAMES tinfo ncurses ncursesw)
148
+ if(TINFO_LIBRARY)
149
+ target_link_libraries(_core PRIVATE ${TINFO_LIBRARY})
150
+ endif()
151
+ elseif(APPLE)
152
+ # macOS system libraries
153
+ find_library(COREFOUNDATION_LIBRARY CoreFoundation)
154
+ target_link_libraries(_core PRIVATE ${COREFOUNDATION_LIBRARY})
155
+ endif()
156
+
157
+ set_target_properties(_core PROPERTIES
158
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/justjit"
159
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/justjit"
160
+ )
161
+
162
+ install(TARGETS _core LIBRARY DESTINATION justjit)
justjit-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions
133
+ of this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Magi Sharma J (github.com/magi8101)
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.