@beetlebug/ztk 0.0.0-stage → 0.2.0-beta

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.
package/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2026 The ztk authors
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/NOTICE ADDED
@@ -0,0 +1,18 @@
1
+ ztk
2
+ Copyright (c) 2026 The ztk authors
3
+ Licensed under the BSD 2-Clause License. See LICENSE.
4
+
5
+ ztk.wasm contains these other works. The license texts are in the
6
+ licenses/ folder.
7
+
8
+ Work License License text
9
+ ztcl (the interpreter) BSD-2-Clause licenses/ztcl/LICENSE
10
+ Zig standard library MIT licenses/ztcl/zig-std-MIT.txt
11
+ musl libc (math) MIT licenses/ztcl/musl-MIT.txt
12
+ Go (parseFloat, pow) BSD-3-Clause licenses/ztcl/go-BSD-3-Clause.txt
13
+ ARM optimized-routines MIT or Apache licenses/ztcl/arm-optimized-routines.txt
14
+ Inter font OFL-1.1 licenses/LICENSE-Inter.txt
15
+
16
+ ztcl follows the language rules and the command behavior of Tcl, and ztk
17
+ follows the commands of Tk. They have no code of Tcl or Tk. The Tcl/Tk
18
+ License is in licenses/ztcl/tcl-license.txt.
package/README.md CHANGED
@@ -1,3 +1,101 @@
1
- # Temporary Holding Version
1
+ # @beetlebug/ztk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ztk is a replacement for Tk, written in Zig, on the Tcl interpreter ztcl. This package runs ztk in a browser. A Tcl script with Tk commands makes the widgets, and ztk draws them on a canvas with WebGL 2, or with its CPU renderer.
4
+
5
+ - `ztk.wasm` has the interpreter, the widgets, the layout, the style sheets, the fonts (Inter), and the CPU renderer. It is 3.0 MB, or 1.0 MB with gzip.
6
+ - The page side handles the input, the input methods (IME), the HiDPI scale, the color scheme, and ARIA roles for the widgets.
7
+ - It has types for TypeScript.
8
+
9
+ The docs are at [beetlebug.org/ztk](https://beetlebug.org/ztk/web/). The source is at [github.com/beetlebugorg/ztk](https://github.com/beetlebugorg/ztk).
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ npm install @beetlebug/ztk
15
+ ```
16
+
17
+ ## Mount an app
18
+
19
+ ```js
20
+ import * as ztk from "@beetlebug/ztk";
21
+
22
+ const app = await ztk.mount(document.getElementById("app"), {
23
+ script: `
24
+ button .b -text Hello -command {set clicked 1}
25
+ label .l -text World
26
+ pack .b .l -padx 8 -pady 8
27
+ `,
28
+ theme: "dark",
29
+ });
30
+ app.eval("winfo children ."); // { ok: true, result: ".b .l" }
31
+ app.destroy();
32
+ ```
33
+
34
+ `mount` adds a canvas to the element, runs the script, and draws the first frame. A script error rejects the promise with the error text, and the element is empty again.
35
+
36
+ ## In a page with no build step
37
+
38
+ ```html
39
+ <div id="app" style="width: 480px; height: 320px"></div>
40
+ <script type="module">
41
+ import * as ztk from "https://cdn.jsdelivr.net/npm/@beetlebug/ztk@0.2.0-beta/ztk.js";
42
+
43
+ const app = await ztk.mount(document.getElementById("app"), {
44
+ script: "button .b -text Hello; pack .b -padx 8 -pady 8",
45
+ });
46
+ </script>
47
+ ```
48
+
49
+ The module loads `ztk.wasm` from its own folder on the CDN. The jsDelivr form `https://cdn.jsdelivr.net/npm/@beetlebug/ztk/+esm` resolves `ztk.wasm` in the same folder, but no test runs it.
50
+
51
+ ## With a bundler
52
+
53
+ The import is the same as above. The module finds `ztk.wasm` with `new URL("./ztk.wasm", import.meta.url)`, and `vite build` copies the file. For the Vite dev server, keep the package out of the dependency step, so the two files stay together:
54
+
55
+ ```js
56
+ // vite.config.js
57
+ export default { optimizeDeps: { exclude: ["@beetlebug/ztk"] } };
58
+ ```
59
+
60
+ The tests of the package run Vite 7. Webpack 5 and Rollup also have support for the `new URL` form, but no test runs them. With another tool, copy `ztk.wasm` to your site and give its URL as the option `wasm`.
61
+
62
+ ## Options of mount
63
+
64
+ | Option | Use |
65
+ |---|---|
66
+ | `script` | Tcl text with Tk commands. It runs after `files`. |
67
+ | `files` | Files by name for `ztk::style load`, for example `{ "app.css": text }`. |
68
+ | `theme` | `"auto"` (the default) follows `prefers-color-scheme` of the page. `"light"` and `"dark"` set the scheme. |
69
+ | `size` | `"auto"` (the default): the window starts with the size of the element and then gets the size of its widgets, as a Tk toplevel does. `"fill"`: the window follows the size of the element, so give the element a size. `[width, height]`: a fixed logical size, which the canvas shows at the CSS size that the page gives it. |
70
+ | `renderer` | `"auto"` (the default), `"webgl2"`, `"cpu"`, or `"webgpu"`. `"auto"` selects WebGL 2, and the CPU renderer when the browser has no WebGL 2. This version has no WebGPU renderer, so `"webgpu"` rejects. |
71
+ | `scale` | The device pixels in one logical pixel. The default is `devicePixelRatio`, and a change of it gives a new scale. |
72
+ | `module` | A module from `compileModule()`, so that many apps on one page compile `ztk.wasm` one time. |
73
+ | `wasm` | The URL of `ztk.wasm`. The default is the file next to `ztk.js`. |
74
+ | `log` | Gets the text of `puts` and the error messages. The default is `console.log`. |
75
+
76
+ ## The app
77
+
78
+ | Member | Use |
79
+ |---|---|
80
+ | `app.eval(script)` | Runs Tcl text. Returns `{ ok, result }`. The next frame shows the change. |
81
+ | `app.addFile(name, text)` | Adds a file for `ztk::style load`. |
82
+ | `app.resize(width, height)` | Gives the window a new logical size. |
83
+ | `app.setTheme(theme)` | `"auto"`, `"light"`, or `"dark"`. |
84
+ | `app.destroy()` | Stops the frame loop, removes the listeners and the elements of the app, and frees the renderer. |
85
+ | `app.canvas`, `app.renderer`, `app.tree` | The canvas, the renderer in use, and the hidden elements with ARIA roles. |
86
+
87
+ Each app has its own WebAssembly instance. Input goes to the canvas, and a hidden text area holds the keyboard focus, so text input and input methods work.
88
+
89
+ ## Limits
90
+
91
+ - ztk is new. It has a subset of the widgets and commands of Tk. The [status](https://github.com/beetlebugorg/ztk#status) lists what works.
92
+ - ztk runs in a browser. In Node.js, the module loads and `compileModule` works, but `mount` needs a DOM.
93
+ - The script runs on the main thread of the page.
94
+
95
+ ## The interpreter
96
+
97
+ `ztk.wasm` has its own copy of ztcl, the Tcl interpreter. It does not use the ztcl npm package. The Tk commands are in the same interpreter as the script, so one module has both.
98
+
99
+ ## License
100
+
101
+ BSD-2-Clause. `ztk.wasm` contains ztcl, the Zig standard library (with ports of code from musl, Go, and ARM optimized-routines), and the Inter font (SIL Open Font License 1.1). See `NOTICE` and the `licenses` folder.
@@ -0,0 +1,92 @@
1
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font creation
14
+ efforts of academic and linguistic communities, and to provide a free and
15
+ open framework in which fonts may be shared and improved in partnership
16
+ with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The
20
+ fonts, including any derivative works, can be bundled, embedded,
21
+ redistributed and/or sold with any software provided that any reserved
22
+ names are not used by derivative works. The fonts and derivatives,
23
+ however, cannot be released under any other type of license. The
24
+ requirement for fonts to remain under this license does not apply
25
+ to any document created using the fonts or their derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may
30
+ include source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software components as
36
+ distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to, deleting,
39
+ or substituting -- in part or in whole -- any of the components of the
40
+ Original Version, by changing formats or by porting the Font Software to a
41
+ new environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical
44
+ writer or other person who contributed to the Font Software.
45
+
46
+ PERMISSION AND CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
49
+ redistribute, and sell modified and unmodified copies of the Font
50
+ Software, subject to the following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components,
53
+ in Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy
57
+ contains the above copyright notice and this license. These can be
58
+ included either as stand-alone text files, human-readable headers or
59
+ in the appropriate machine-readable metadata fields within text or
60
+ binary files as long as those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font
63
+ Name(s) unless explicit written permission is granted by the corresponding
64
+ Copyright Holder. This restriction only applies to the primary font name as
65
+ presented to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any
69
+ Modified Version, except to acknowledge the contribution(s) of the
70
+ Copyright Holder(s) and the Author(s) or with their explicit written
71
+ permission.
72
+
73
+ 5) The Font Software, modified or unmodified, in part or in whole,
74
+ must be distributed entirely under this license, and must not be
75
+ distributed under any other license. The requirement for fonts to
76
+ remain under this license does not apply to any document created
77
+ using the Font Software.
78
+
79
+ TERMINATION
80
+ This license becomes null and void if any of the above conditions are
81
+ not met.
82
+
83
+ DISCLAIMER
84
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
86
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
87
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
88
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
90
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
91
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
92
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,24 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2026 The ztcl authors
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,249 @@
1
+ MIT OR Apache-2.0 WITH LLVM-exception
2
+ =====================================
3
+
4
+
5
+ MIT License
6
+ -----------
7
+
8
+ Copyright (c) 1999-2022, Arm Limited.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+
29
+ Apache-2.0 WITH LLVM-exception
30
+ ------------------------------
31
+
32
+ Apache License
33
+ Version 2.0, January 2004
34
+ http://www.apache.org/licenses/
35
+
36
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
37
+
38
+ 1. Definitions.
39
+
40
+ "License" shall mean the terms and conditions for use, reproduction,
41
+ and distribution as defined by Sections 1 through 9 of this document.
42
+
43
+ "Licensor" shall mean the copyright owner or entity authorized by
44
+ the copyright owner that is granting the License.
45
+
46
+ "Legal Entity" shall mean the union of the acting entity and all
47
+ other entities that control, are controlled by, or are under common
48
+ control with that entity. For the purposes of this definition,
49
+ "control" means (i) the power, direct or indirect, to cause the
50
+ direction or management of such entity, whether by contract or
51
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
52
+ outstanding shares, or (iii) beneficial ownership of such entity.
53
+
54
+ "You" (or "Your") shall mean an individual or Legal Entity
55
+ exercising permissions granted by this License.
56
+
57
+ "Source" form shall mean the preferred form for making modifications,
58
+ including but not limited to software source code, documentation
59
+ source, and configuration files.
60
+
61
+ "Object" form shall mean any form resulting from mechanical
62
+ transformation or translation of a Source form, including but
63
+ not limited to compiled object code, generated documentation,
64
+ and conversions to other media types.
65
+
66
+ "Work" shall mean the work of authorship, whether in Source or
67
+ Object form, made available under the License, as indicated by a
68
+ copyright notice that is included in or attached to the work
69
+ (an example is provided in the Appendix below).
70
+
71
+ "Derivative Works" shall mean any work, whether in Source or Object
72
+ form, that is based on (or derived from) the Work and for which the
73
+ editorial revisions, annotations, elaborations, or other modifications
74
+ represent, as a whole, an original work of authorship. For the purposes
75
+ of this License, Derivative Works shall not include works that remain
76
+ separable from, or merely link (or bind by name) to the interfaces of,
77
+ the Work and Derivative Works thereof.
78
+
79
+ "Contribution" shall mean any work of authorship, including
80
+ the original version of the Work and any modifications or additions
81
+ to that Work or Derivative Works thereof, that is intentionally
82
+ submitted to Licensor for inclusion in the Work by the copyright owner
83
+ or by an individual or Legal Entity authorized to submit on behalf of
84
+ the copyright owner. For the purposes of this definition, "submitted"
85
+ means any form of electronic, verbal, or written communication sent
86
+ to the Licensor or its representatives, including but not limited to
87
+ communication on electronic mailing lists, source code control systems,
88
+ and issue tracking systems that are managed by, or on behalf of, the
89
+ Licensor for the purpose of discussing and improving the Work, but
90
+ excluding communication that is conspicuously marked or otherwise
91
+ designated in writing by the copyright owner as "Not a Contribution."
92
+
93
+ "Contributor" shall mean Licensor and any individual or Legal Entity
94
+ on behalf of whom a Contribution has been received by Licensor and
95
+ subsequently incorporated within the Work.
96
+
97
+ 2. Grant of Copyright License. Subject to the terms and conditions of
98
+ this License, each Contributor hereby grants to You a perpetual,
99
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
100
+ copyright license to reproduce, prepare Derivative Works of,
101
+ publicly display, publicly perform, sublicense, and distribute the
102
+ Work and such Derivative Works in Source or Object form.
103
+
104
+ 3. Grant of Patent License. Subject to the terms and conditions of
105
+ this License, each Contributor hereby grants to You a perpetual,
106
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
107
+ (except as stated in this section) patent license to make, have made,
108
+ use, offer to sell, sell, import, and otherwise transfer the Work,
109
+ where such license applies only to those patent claims licensable
110
+ by such Contributor that are necessarily infringed by their
111
+ Contribution(s) alone or by combination of their Contribution(s)
112
+ with the Work to which such Contribution(s) was submitted. If You
113
+ institute patent litigation against any entity (including a
114
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
115
+ or a Contribution incorporated within the Work constitutes direct
116
+ or contributory patent infringement, then any patent licenses
117
+ granted to You under this License for that Work shall terminate
118
+ as of the date such litigation is filed.
119
+
120
+ 4. Redistribution. You may reproduce and distribute copies of the
121
+ Work or Derivative Works thereof in any medium, with or without
122
+ modifications, and in Source or Object form, provided that You
123
+ meet the following conditions:
124
+
125
+ (a) You must give any other recipients of the Work or
126
+ Derivative Works a copy of this License; and
127
+
128
+ (b) You must cause any modified files to carry prominent notices
129
+ stating that You changed the files; and
130
+
131
+ (c) You must retain, in the Source form of any Derivative Works
132
+ that You distribute, all copyright, patent, trademark, and
133
+ attribution notices from the Source form of the Work,
134
+ excluding those notices that do not pertain to any part of
135
+ the Derivative Works; and
136
+
137
+ (d) If the Work includes a "NOTICE" text file as part of its
138
+ distribution, then any Derivative Works that You distribute must
139
+ include a readable copy of the attribution notices contained
140
+ within such NOTICE file, excluding those notices that do not
141
+ pertain to any part of the Derivative Works, in at least one
142
+ of the following places: within a NOTICE text file distributed
143
+ as part of the Derivative Works; within the Source form or
144
+ documentation, if provided along with the Derivative Works; or,
145
+ within a display generated by the Derivative Works, if and
146
+ wherever such third-party notices normally appear. The contents
147
+ of the NOTICE file are for informational purposes only and
148
+ do not modify the License. You may add Your own attribution
149
+ notices within Derivative Works that You distribute, alongside
150
+ or as an addendum to the NOTICE text from the Work, provided
151
+ that such additional attribution notices cannot be construed
152
+ as modifying the License.
153
+
154
+ You may add Your own copyright statement to Your modifications and
155
+ may provide additional or different license terms and conditions
156
+ for use, reproduction, or distribution of Your modifications, or
157
+ for any such Derivative Works as a whole, provided Your use,
158
+ reproduction, and distribution of the Work otherwise complies with
159
+ the conditions stated in this License.
160
+
161
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
162
+ any Contribution intentionally submitted for inclusion in the Work
163
+ by You to the Licensor shall be under the terms and conditions of
164
+ this License, without any additional terms or conditions.
165
+ Notwithstanding the above, nothing herein shall supersede or modify
166
+ the terms of any separate license agreement you may have executed
167
+ with Licensor regarding such Contributions.
168
+
169
+ 6. Trademarks. This License does not grant permission to use the trade
170
+ names, trademarks, service marks, or product names of the Licensor,
171
+ except as required for reasonable and customary use in describing the
172
+ origin of the Work and reproducing the content of the NOTICE file.
173
+
174
+ 7. Disclaimer of Warranty. Unless required by applicable law or
175
+ agreed to in writing, Licensor provides the Work (and each
176
+ Contributor provides its Contributions) on an "AS IS" BASIS,
177
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
178
+ implied, including, without limitation, any warranties or conditions
179
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
180
+ PARTICULAR PURPOSE. You are solely responsible for determining the
181
+ appropriateness of using or redistributing the Work and assume any
182
+ risks associated with Your exercise of permissions under this License.
183
+
184
+ 8. Limitation of Liability. In no event and under no legal theory,
185
+ whether in tort (including negligence), contract, or otherwise,
186
+ unless required by applicable law (such as deliberate and grossly
187
+ negligent acts) or agreed to in writing, shall any Contributor be
188
+ liable to You for damages, including any direct, indirect, special,
189
+ incidental, or consequential damages of any character arising as a
190
+ result of this License or out of the use or inability to use the
191
+ Work (including but not limited to damages for loss of goodwill,
192
+ work stoppage, computer failure or malfunction, or any and all
193
+ other commercial damages or losses), even if such Contributor
194
+ has been advised of the possibility of such damages.
195
+
196
+ 9. Accepting Warranty or Additional Liability. While redistributing
197
+ the Work or Derivative Works thereof, You may choose to offer,
198
+ and charge a fee for, acceptance of support, warranty, indemnity,
199
+ or other liability obligations and/or rights consistent with this
200
+ License. However, in accepting such obligations, You may act only
201
+ on Your own behalf and on Your sole responsibility, not on behalf
202
+ of any other Contributor, and only if You agree to indemnify,
203
+ defend, and hold each Contributor harmless for any liability
204
+ incurred by, or claims asserted against, such Contributor by reason
205
+ of your accepting any such warranty or additional liability.
206
+
207
+ END OF TERMS AND CONDITIONS
208
+
209
+ APPENDIX: How to apply the Apache License to your work.
210
+
211
+ To apply the Apache License to your work, attach the following
212
+ boilerplate notice, with the fields enclosed by brackets "[]"
213
+ replaced with your own identifying information. (Don't include
214
+ the brackets!) The text should be enclosed in the appropriate
215
+ comment syntax for the file format. We also recommend that a
216
+ file or class name and description of purpose be included on the
217
+ same "printed page" as the copyright notice for easier
218
+ identification within third-party archives.
219
+
220
+ Copyright [yyyy] [name of copyright owner]
221
+
222
+ Licensed under the Apache License, Version 2.0 (the "License");
223
+ you may not use this file except in compliance with the License.
224
+ You may obtain a copy of the License at
225
+
226
+ http://www.apache.org/licenses/LICENSE-2.0
227
+
228
+ Unless required by applicable law or agreed to in writing, software
229
+ distributed under the License is distributed on an "AS IS" BASIS,
230
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
231
+ See the License for the specific language governing permissions and
232
+ limitations under the License.
233
+
234
+
235
+ --- LLVM Exceptions to the Apache 2.0 License ----
236
+
237
+ As an exception, if, as a result of your compiling your source code, portions
238
+ of this Software are embedded into an Object form of such source code, you
239
+ may redistribute such embedded portions in such Object form without complying
240
+ with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
241
+
242
+ In addition, if you combine or link compiled forms of this Software with
243
+ software that is licensed under the GPLv2 ("Combined Software") and if a
244
+ court of competent jurisdiction determines that the patent provision (Section
245
+ 3), the indemnity provision (Section 9) or other Section of the License
246
+ conflicts with the conditions of the GPLv2, you may retroactively and
247
+ prospectively choose to deem waived or otherwise exclude such Section(s) of
248
+ the License, but only in their entirety and only with respect to the Combined
249
+ Software.
@@ -0,0 +1,27 @@
1
+ Copyright 2009 The Go Authors.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are
5
+ met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above
10
+ copyright notice, this list of conditions and the following disclaimer
11
+ in the documentation and/or other materials provided with the
12
+ distribution.
13
+ * Neither the name of Google LLC nor the names of its
14
+ contributors may be used to endorse or promote products derived from
15
+ this software without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.