-
Notifications
You must be signed in to change notification settings - Fork 20
/
main.jsx
executable file
·593 lines (578 loc) · 20.3 KB
/
main.jsx
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
#!/usr/bin/env -S deno run --no-check --watch=data/ --allow-read --allow-net
/** @jsx h */
/** @jsxFrag Fragment */
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { serveDir } from "https://deno.land/[email protected]/http/file_server.ts";
import { Fragment, h, Helmet, ssr } from "https://crux.land/[email protected]";
import work from "./data/work.json" with { type: "json" };
function Home() {
return (
<Layout>
<Header />
<Links />
<p class="mt-12 text-lg text-justify">
WinterTC (TC55) is an Ecma International Technical Committee that aims
to achieve some level of API interoperability across server-side
JavaScript runtimes, especially for APIs that are common with the web.
This is done by standardizing a{" "}
<a
href="https://min-common-api.proposal.wintercg.org"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
“minimum common API”
</a>{" "}
shared with the web that such runtimes should support, as well as by
collaborating with web standards groups (WHATWG, W3C...) for new web
APIs and changes to current web APIs. We also publish standards to add
new interoperable server-side APIs.{" "}
<a
href="/faq"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
Learn more.
</a>
</p>
<Logos />
<Footer />
</Layout>
);
}
function WorkItems(props) {
return (
<div class="mt-8 space-y-6">
{props.items.map((item) => (
<article>
<h2 class="text-xl font-medium">{item.name}</h2>
<p class="text-lg">{item.description}</p>
<p class="flex gap-4">
<a
href={`https://github.com/${props.repoPrefix ?? ""}${item.repo}`}
class="text-pink-500 hover:text-pink-700 hover:underline"
>
Repository
</a>
{item.specification && (
<a
href={item.specification}
class="text-pink-500 hover:text-pink-700 hover:underline"
>
Specification
</a>
)}
</p>
</article>
))}
</div>
);
}
function Work() {
return (
<Layout>
<Header />
<Links selected="/work" />
<p class="mt-12 text-lg">
WinterTC is currently working on various standards to improve
interoperability across server-side runtimes:
</p>
<WorkItems items={work.specs} repoPrefix="wintercg/" />
<p class="mt-12 text-lg">
We are also collaborating with other standards bodies to make web
platform APIs more suitable to server-side runtimes:
</p>
<WorkItems items={work.collaborations} />
<Footer />
</Layout>
);
}
function Faq() {
return (
<Layout>
<Header />
<Links selected="/faq" />
<section class="mt-12 text-lg space-y-10">
<div class="space-y-4">
<div id="what-is-the-wintercg"></div>
<a href="#what-is-wintertc" id="what-is-wintertc">
<h2 class="text-2xl font-medium">What is WinterTC?</h2>
</a>
<p>
The Technical Committee on Web-interoperable Server Runtimes
(WinterTC) is a community of people who are interested in
interoperability across server-side (Deno / Node.js) or edge
JavaScript runtimes (Cloudflare Workers / Deno Deploy), especially
for Web Platform APIs.
</p>
<p>
WinterTC is organized as Ecma International's{" "}
<a
href="https://ecma-international.org/technical-committees/tc55/"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
Technical Committee number 55 (TC55)
</a>. This gives the group access to Ecma's vast infrastructure and
its IPR policy work, as well as the ability to publish standards.
This is the same type of committee as{" "}
<a
href="https://tc39.es/"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
TC39
</a>, which standardizes the JavaScript language.
</p>
</div>
<div class="space-y-4">
<a href="#what-are-we-trying-to-do" id="what-are-we-trying-to-do">
<h2 class="text-2xl font-medium">
What are we trying to do?
</h2>
</a>
<p>
The ultimate goal of this committee is to promote runtimes
supporting a comprehensive unified API surface that JavaScript
developers can rely on, regardless of whether their code will be
used in browsers, servers, or edge runtimes.
</p>
<p>
It is another goal of WinterTC that runtimes with needs for
capabilities beyond web platform APIs, in particular server-side and
edge runtimes, still have unified surfaces.
</p>
<p>
The members of the committee want to provide a space to better
coordinate between server-side implementors, as well as with browser
vendors, on how to best achieve this interoperability.
</p>
<p>
It is not explicitly a goal of WinterTC to promote such a unified
API surface for other JavaScript environments, such as embedded
applications. However, the results of our work could be useful to
such environments nonetheless.
</p>
</div>
<div class="space-y-4">
<a
href="#how-do-we-want-to-achieve-our-goals"
id="how-do-we-want-to-achieve-our-goals"
>
<h2 class="text-2xl font-medium">
How do we want to achieve our goals?
</h2>
</a>
<p>
We want to specify and document how server side runtimes can best
implement Web Platform APIs and to what extent they could deviate
from browsers.
</p>
<p>
We want to provide feedback to spec authors of Web Platform APIs
from the view point of non-browser runtimes to help them make
informed decisions about future changes and additions to these
specifications.
</p>
<p>
We want to develop and specify new APIs that, although they might be
too powerful for the Web Platform or not fit within its security
model, would still be a great fit for server-side runtimes and would
be part of a comprehensive unified API surface for such runtimes.
</p>
</div>
<div class="space-y-4">
<a href="#why-are-we-doing-this" id="why-are-we-doing-this">
<h2 class="text-2xl font-medium">Why are we doing this?</h2>
</a>
<p>
The members of this group all share the belief that a comprehensive
unified API surface for JS runtimes is something that would benefit
the JS community as a whole. In the past members have individually
worked on making this a reality.
</p>
<p>
This disparate approach with little coordination has historically
led to much confusion between not just browser vendors, spec
authors, and other implementors, but also between non browser
implementors and other non browser implementors on topics of unified
API. This was often caused by the fact that discussions were spread
over various disparate issue and PR comments with often little
context or cohesion between them.
</p>
<p>
We think that by working together more tightly we can provide
browser vendors and specification editors with more meaningful
feedback from users of non-browser JS runtimes. This will help them
make informed decisions about future specification changes that
relate to the goal of a comprehensive unified API surface for JS
runtimes.
</p>
</div>
<div class="space-y-4">
<a
href="#what-we-are-not-trying-to-do"
id="what-we-are-not-trying-to-do"
>
<h2 class="text-2xl font-medium">What are we NOT trying to do?</h2>
</a>
<p>
We do not want to fork or create new versions of existing
specifications. If we think a new web platform API is needed, or if
we think an existing spec needs changes, the goal is always for that
change or addition to be developed in an existing venue (such as
WHATWG or W3C). WinterTC will publish requirements on what those
changes could be, and it will be up to that existing standards body
to make these changes, possibly through members who are part of both
WinterTC and that standards body.
</p>
<p>
We do not want to create new server-side APIs that overlap with
existing web platform APIs. If there is a proposed or standardized
web API that overlaps with the needs of server-side runtimes, the
goal is always to investigate what changes (if any) it would need to
be useful for servers; and once those changes have been incorporated
to the specification, to eventually add the API to the minimum
common set.
</p>
<p>
We are not trying to shift the focus of Web Platform APIs to only
serve server-side runtimes. We want to see more API surface that is
useful and works great both in browsers and on the server.
</p>
</div>
<div class="space-y-4">
<a
href="#is-this-the-same-as-wintercg"
id="is-this-the-same-as-wintercg"
>
<h2 class="text-2xl font-medium">
Is this the same as “WinterCG”?
</h2>
</a>
<p>
We initially started our work of working on this cross-runtime
interoperability in May 2022 by creating the Web-interoperable
Runtimes Community Group (nicknamed WinterCG) under the W3C. We
chose to organize it as a W3C Community Group because it was open
for anyone to participate, without needing to be a W3C member.
</p>
<p>
W3C Community Groups are set up to help people organize together,
but they can't publish standards. And as WinterCG matured, and our
goal expanded over time to include defining non-web APIs, it became
clear that we needed to form some working group or technical
committee, which can publish standards. Therefore, in December 2024
we formed WinterTC (formally, TC55) as an Ecma International
Technical Committee. When WinterTC is fully set up, all WinterCG
work will move there, and then WinterCG will close.
</p>
</div>
{
// TODO: Uncomment and rewrite when we've figured out TC55's process.
//
// <div class="space-y-4">
// <div id="does-the-wintercg-operate-by-consensus"></div>
// <a
// href="#does-wintertc-operate-by-consensus"
// id="does-wintertc-operate-by-consensus"
// >
// <h2 class="text-2xl font-medium">
// Does WinterTC operate by consensus?
// </h2>
// </a>
// <p>
// The group strives for rough consensus among contributors for changes
// to work products. Instead of formal consensus, the editors for a
// given work product make the judgement on whether a change is ready
// for inclusion and has enough support from the group. The group
// itself has a strict consensus policy outlined in the charter, which
// is overseen by the group chairs.
// </p>
// </div>
}
<div class="space-y-4">
<div id="who-controls-the-wintercg"></div>
<a href="#who-controls-wintertc" id="who-controls-wintertc">
<h2 class="text-2xl font-medium">Who controls WinterTC?</h2>
</a>
<p>
WinterTC is controlled by the community of people who are working in
it. The chair(s) of the group help moderate discussion and help
guide the group towards consensus on proposed changes.
</p>
<p>
Currently the group consists of individual members, as well as
members from the following organizations:
</p>
<ul class="list-disc pl-7">
<li>Bloomberg</li>
<li>Cloudflare</li>
<li>Deno</li>
<li>Igalia</li>
<li>Node.js</li>
</ul>
</div>
<div class="space-y-4">
<a
href="#how-can-i-participate"
id="how-can-i-participate"
>
<h2 class="text-2xl font-medium">
How can I participate?
</h2>
</a>
<p>
The work of WinterTC happens openly{" "}
<a
href="https://github.com/wintercg"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
on Github
</a>
, and most of the discussion and conversation around it happens in
{" "}
<a
href="https://matrix.to/#/#wintercg:matrix.org"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
our Matrix room
</a>
. Anyone is welcome to participate in both of them.
</p>
<p>
Only WinterTC delegates and invited experts can participate in
WinterTC meetings, though. Delegates need to belong to an Ecma
member organization, but anyone else who wants to be involved in
WinterTC can become an invited expert. To do so, you can{" "}
<a
href="https://github.com/WinterCG/admin/issues/new/choose"
class="text-pink-500 hover:text-pink-700 hover:underline"
>
open an issue
</a>{" "}
in the WinterTC admin repo.
</p>
</div>
</section>
<Footer />
</Layout>
);
}
const DESCRIPTION =
"WinterTC is an Ecma International Technical Committee aiming to provide a space for JS runtimes to collaborate on API interoperability.";
function Layout(props) {
return (
<>
<Helmet>
<title>WinterTC</title>
<link
rel="shortcut icon"
href="/static/logo.svg"
type="image/svg+xml"
/>
<meta name="description" content={DESCRIPTION} />
<meta name="og:title" content="WinterTC" />
<meta name="og:description" content={DESCRIPTION} />
<meta name="og:image" content="https://wintercg.org/static/cover.png" />
<meta name="og:url" content="https://wintercg.org" />
<meta name="og:type" content="website" />
</Helmet>
<div class="mx-auto px-4 py-8 max-w-screen-md">
{props.children}
</div>
</>
);
}
function Header() {
return (
<section class="flex items-center gap-6">
<a class="flex-shrink-0" href="/">
<img src="/static/logo.svg" alt="wintertc logo" class="w-24 h-24" />
</a>
<a href="/" class="block space-y-1">
<h1 class="text-4xl font-semibold">WinterTC</h1>
<p class="italic text-xl">
Technical Committee on Web-interoperable Server Runtimes
</p>
</a>
</section>
);
}
const LINKS = [
{
name: "Work",
href: "/work",
},
{
name: "FAQ",
href: "/faq",
},
{
name: "GitHub",
href: "https://github.com/wintercg",
},
{
name: "Scope",
href: "https://ecma-international.org/technical-committees/tc55",
},
];
function Links(props) {
return (
<ul class="mt-8 grid gap-2 sm:gap-3 md:gap-4 grid-cols-4">
{LINKS.map((link) => (
<li>
<a
href={props.selected === link.href ? undefined : link.href}
class={`block border-4 ${props.selected === link.href
? "bg-pink-200 text-black border-pink-300"
: "bg-pink-500 text-white border-pink-300 hover:border-pink-600"
} sm:p-2 md:p-3 font-medium text-lg text-center`}
>
{link.name}
</a>
</li>
))}
</ul>
);
}
// NOTE to all: keep this list sorted alphabetically by name.
const PARTNER_LOGOS = [
{
src: "/static/logos/alibaba.png",
href: "https://alibabagroup.com/",
name: "Alibaba",
restrict: "horizontal",
},
{
src: null,
href: "https://techatbloomberg.com/",
name: "Bloomberg",
},
{
src: "/static/logos/bytedance.png",
href: "https://bytedance.com/",
name: "ByteDance",
restrict: "horizontal",
licenseExpiration: new Date(2026, 6, 28), // We are only licensed to use the image until 2026-06-29.
},
{
src: "/static/logos/cloudflare.svg",
href: "https://cloudflare.com/",
name: "Cloudflare",
},
{
src: "/static/logos/deno.svg",
href: "https://deno.com/",
name: "Deno",
},
{
src: "/static/logos/fastly.svg",
href: "https://www.fastly.com/",
name: "Fastly",
restrict: "vertical",
},
{
src: "/static/logos/igalia.png",
href: "https://igalia.com/",
name: "Igalia",
restrict: "horizontal",
},
{
src: "/static/logos/netlify.svg",
href: "https://netlify.com/",
name: "Netlify",
restrict: "horizontal",
},
{
src: "/static/logos/nodejs.svg",
href: "https://nodejs.org",
name: "Node.js",
restrict: "horizontal",
},
{
src: "/static/logos/shopify.svg",
href: "https://shopify.dev/",
name: "Shopify",
restrict: "horizontal",
},
{
src: "/static/logos/suborbital.svg",
href: "https://suborbital.dev/",
name: "Suborbital",
restrict: "horizontal",
},
{
src: "/static/logos/vercel.svg",
href: "https://vercel.com/",
name: "Vercel",
restrict: "horizontal",
},
{
src: "/static/logos/azion.svg",
href: "https://azion.com/",
name: "Azion",
restrict: "horizontal",
},
/** TODO: Add additional logos here */
].filter(({ licenseExpiration: le }) => !le || le > new Date());
function Logos() {
return (
<div>
<p class="mt-16 text-center">
The work of WinterTC (and its predecessor WinterCG) has included
participation from:
</p>
<div class="mt-8 flex gap-4 flex-wrap justify-evenly sm:justify-evenly items-center">
{PARTNER_LOGOS.map(({ src, href, name, restrict }) => (
<a href={href}>
{src === null ? name : (
<img
src={src}
title={`${name} logo`}
alt={`${name} logo`}
class={restrict === "vertical"
? "h-8 sm:h-11"
: (restrict === "horizontal"
? "w-28 sm:w-36"
: "h-12 sm:h-16")}
/>
)}
</a>
))}
</div>
</div>
);
}
function Footer() {
return (
<footer class="mt-16 text-center border-t-1 border-gray-100 p-4 space-y-4">
<p>
<a href="https://matrix.to/#/#wintercg:matrix.org">
<img
class="h-6 inline-block"
src="/static/logos/matrix.svg"
alt="Chat with us on Matrix"
/>
</a>
</p>
<p class="text-sm text-gray-600">
Copyright © Ecma International.
</p>
</footer>
);
}
console.log("Listening on http://localhost:8000");
await serve((req) => {
const url = new URL(req.url);
if (url.pathname === "/") {
return ssr(() => <Home />);
} else if (url.pathname === "/work") {
return ssr(() => <Work />);
} else if (url.pathname === "/faq") {
return ssr(() => <Faq />);
} else if (url.pathname.startsWith("/static/")) {
return serveDir(req, {
urlRoot: "static",
fsRoot: "./static",
quiet: true,
});
} else {
return new Response("Not Found", { status: 404 });
}
});