forked from oven-sh/bun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLICENSE
229 lines (136 loc) · 4.37 KB
/
LICENSE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
Bun itself is MIT-licensed.
## JavaScriptCore
Bun statically links JavaScriptCore (and WebKit) which is LGPL-2 licensed. WebCore files from WebKit are also licensed under LGPL2. Per LGPL2:
> (1) If you statically link against an LGPL’d library, you must also provide your application in an object (not necessarily source) format, so that a user has the opportunity to modify the library and relink the application.
You can find the patched version of WebKit used by Bun here: <https://github.com/oven-sh/webkit>. If you would like to relink Bun with changes:
- `git submodule update --init --recursive`
- `make jsc`
- `zig build`
This compiles JavaScriptCore, compiles Bun’s `.cpp` bindings for JavaScriptCore (which are the object files using JavaScriptCore) and outputs a new `bun` binary with your changes.
## Linked libraries
Bun statically links these libraries:
{% table %}
- Library
- License
---
- [`boringssl`](https://boringssl.googlesource.com/boringssl/)
- [several licenses](https://boringssl.googlesource.com/boringssl/+/refs/heads/master/LICENSE)
---
---
- [`brotli`](https://github.com/google/brotli)
- MIT
---
- [`libarchive`](https://github.com/libarchive/libarchive)
- [several licenses](https://github.com/libarchive/libarchive/blob/master/COPYING)
---
- [`lol-html`](https://github.com/cloudflare/lol-html/tree/master/c-api)
- BSD 3-Clause
---
- [`mimalloc`](https://github.com/microsoft/mimalloc)
- MIT
---
- [`picohttp`](https://github.com/h2o/picohttpparser)
- dual-licensed under the Perl License or the MIT License
---
- [`zstd`](https://github.com/facebook/zstd)
- dual-licensed under the BSD License or GPLv2 license
---
- [`simdutf`](https://github.com/simdutf/simdutf)
- Apache 2.0
---
- [`tinycc`](https://github.com/tinycc/tinycc)
- LGPL v2.1
---
- [`uSockets`](https://github.com/uNetworking/uSockets)
- Apache 2.0
---
- [`zlib-cloudflare`](https://github.com/cloudflare/zlib)
- zlib
---
- [`c-ares`](https://github.com/c-ares/c-ares)
- MIT licensed
---
- [`libicu`](https://github.com/unicode-org/icu) 72
- [license here](https://github.com/unicode-org/icu/blob/main/icu4c/LICENSE)
---
- [`libbase64`](https://github.com/aklomp/base64/blob/master/LICENSE)
- BSD 2-Clause
---
- A fork of [`uWebsockets`](https://github.com/jarred-sumner/uwebsockets)
- Apache 2.0 licensed
---
- Parts of [Tigerbeetle's IO code](https://github.com/tigerbeetle/tigerbeetle/blob/532c8b70b9142c17e07737ab6d3da68d7500cbca/src/io/windows.zig#L1)
- Apache 2.0 licensed
{% /table %}
## Polyfills
For compatibility reasons, the following packages are embedded into Bun's binary and injected if imported.
{% table %}
- Package
- License
---
- [`assert`](https://npmjs.com/package/assert)
- MIT
---
- [`browserify-zlib`](https://npmjs.com/package/browserify-zlib)
- MIT
---
- [`buffer`](https://npmjs.com/package/buffer)
- MIT
---
- [`constants-browserify`](https://npmjs.com/package/constants-browserify)
- MIT
---
- [`crypto-browserify`](https://npmjs.com/package/crypto-browserify)
- MIT
---
- [`domain-browser`](https://npmjs.com/package/domain-browser)
- MIT
---
- [`events`](https://npmjs.com/package/events)
- MIT
---
- [`https-browserify`](https://npmjs.com/package/https-browserify)
- MIT
---
- [`os-browserify`](https://npmjs.com/package/os-browserify)
- MIT
---
- [`path-browserify`](https://npmjs.com/package/path-browserify)
- MIT
---
- [`process`](https://npmjs.com/package/process)
- MIT
---
- [`punycode`](https://npmjs.com/package/punycode)
- MIT
---
- [`querystring-es3`](https://npmjs.com/package/querystring-es3)
- MIT
---
- [`stream-browserify`](https://npmjs.com/package/stream-browserify)
- MIT
---
- [`stream-http`](https://npmjs.com/package/stream-http)
- MIT
---
- [`string_decoder`](https://npmjs.com/package/string_decoder)
- MIT
---
- [`timers-browserify`](https://npmjs.com/package/timers-browserify)
- MIT
---
- [`tty-browserify`](https://npmjs.com/package/tty-browserify)
- MIT
---
- [`url`](https://npmjs.com/package/url)
- MIT
---
- [`util`](https://npmjs.com/package/util)
- MIT
---
- [`vm-browserify`](https://npmjs.com/package/vm-browserify)
- MIT
{% /table %}
## Additional credits
- Bun's JS transpiler, CSS lexer, and Node.js module resolver source code is a Zig port of [@evanw](https://github.com/evanw)’s [esbuild](https://github.com/evanw/esbuild) project.
- Credit to [@kipply](https://github.com/kipply) for the name "Bun"!