wintercg / runtime-keys Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://runtime-keys.proposal.wintercg.org
Home Page: https://runtime-keys.proposal.wintercg.org
As runtime keys have begun being adopted for individual platforms, some developers have asked for some kind of common key indicating a package is compatible with the WinterCG Minimum Common API, and thus the package will work in any framework that is also compatible with the Minimum Common API.
The simplest solution is to add a "wintercg"
key that indicates Minimum Common API compliance. However, this solution is incomplete.
Since the Minimum Common API specification can change overtime, discrepancies can form between frameworks and packages that both claim to be compliant with the standard. For example, consider ECMAScript. When a developer uses ES2020 features in their code, but the target system can only handle ES6 code, their project simply wont work. To parallel that to the Minimum Common API, imagine if the standard was to change and add a new interface. A developer then uses that new interface in their project, and expects to be able to run their project on any framework that indicates its "wintercg"
compatible. Lets assume a framework hasn't been able to add that new interface yet. This developer's project will not work in that particular framework.
There are plenty more examples to demonstrate how "wintercg" key alone is insufficient, but lets move on to a better solution proposal
There are multiple pieces to this problem
Browser have had a solution to this for a long time, web platform tests. If we create a similar test suite for the Minimum Common API (and maybe even use the existing WPT), frameworks can automatically test themselves against it and report the results to a public tool such as caniuse.com.
Given the usage example in the Runtime Keys specification, libraries and applications can use the "engines"
fields in package.json
to indicate what framework version (or version range) they can be used in. By introducing a "wintercg"
key as well as versioning methodology for that represents compliance with the Minimum Common API, projects could specify exactly what version of the specification they are compliant with.
Incorporating the versioning methodology into the test suite compliance tool, build-time and run-time tooling can be instrumented to compare values between what specified in a project’s configuration file (like package.json
) with what has been publicly recorded and verify if the given project is supported.
This part of the proposal is where I believe much of the debate will be. Two options are provided to start the discussion. Please feel free to provide more options for consideration.
Option 1: Annual versioning
wintercg-2023
and wintercg-next
engines
, they may be used like "wintercg": "2023"
insteadOption 2: semver
wintercg-1.0.0
and wintercg-2.3.4
"wintercg": "1.0.0"
Thank you for reading this proposal. Please comment your thoughts and feedback in this issue thread or in the WinterCG Matrix channel. We will discuss this proposal at the next WinterCG call on May 4th, 2023. It will also be presented during my talk at Open Source Summit on May 10th. 🚀
A lot of times I encounter the need to single a specific runtime out. For instance, all wintercg runtimes meet my criteria except node
.
What I'm looking for is key setup which allows me to put specific runtimes infront of a wintercg catchall.
Can browser service worker runtime be included?
Hono can run in Node, Deno, Bun, Cloudflare Workers, Pages, and can also run in a service worker to power an offline web app.
I'd like to see more things target/support service workers too (e.g. Next.js, Deno Fresh, and HonoX could all be made to work in various runtime environments and could then easily be ran in a service worker).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.