Logo

0x3d.Site

is designed for aggregating information.
Welcome
check repository here

WinterJS is blazing-fast JavaScript server that runs Service Workers scripts according to the Winter Community Group specification.

WinterJS is able to handle up to 100,000 reqs/s in a single laptop (see Benchmark).


Note: WinterJS is not officially endorsed by WinterCG, despite sharing "Winter" in their name. There are many runtimes supporting WinterCG, WinterJS being one among those.

Running WinterJS with Wasmer

The WinterJS server is published in Wasmer as wasmer/winterjs.

You can run the HTTP server locally with:

wasmer run wasmer/winterjs --net --mapdir=tests:tests tests/simple.js

Where simple.js is:

addEventListener('fetch', (req) => {
  req.respondWith(new Response('hello'));
});

Building from source

WinterJS needs to build SpiderMonkey from source as part of its own build process. Please follow the steps outlined here to make sure you are ready to build SpiderMonkey: https://github.com/wasmerio/mozjs/blob/master/README.md.

You also need to do this before installing WinterJS with cargo install, which builds WinterJS from the source instead of downloading pre-built binaries.

Also, when building WinterJS in debug mode, you need to have NodeJS and npm installed and run npm install beforehand. This is required since debug builds of WinterJS also build the TypeScript code in src/builtins/internal_js_modules. Release builds use the existing, pre-compiled *.js sources in that directory. This was done to simplify installing WinterJS with cargo install. If you update the TypeScript sources, make sure to update the *.js sources by building at least once in debug mode and commit the updated *.js files.

Once you can build SpiderMonkey, you simply need to run cargo build as usual to build WinterJS itself.

Running WinterJS Natively

You can install WinterJS natively with:

cargo install --git https://github.com/wasmerio/winterjs winterjs

Once you have WinterJS installed, you can simply do:

winterjs tests/simple.js

And then access the server in https://localhost:8080/

How WinterJS works

WinterJS is powered by SpiderMonkey, Spiderfire and hyper to bring a new level of awesomeness to your Javascript apps.

WinterJS is using the WASIX standard to compile to WebAssembly. Please note that compiling to WASIX is currently a complex process. We recommend using precompiled versions from wasmer/winterjs, but please open an issue if you need to compile to WASIX locally.

Limitations

WinterJS is fully compliant with the WinterCG spec, although the runtime itself is still a work in progress. For more information, see the API Compatibility section below.

WinterCG API Compatibility

This section will be updated as APIs are added/fixed. If an API is missing from this section, that means that it is still not implemented.

You can check a more detailed list here: https://runtime-compat.unjs.io/

The following words are used to describe the status of an API:

  • ✅ Stable - The API is implemented and fully compliant with the spec. This does not account for potential undiscovered implementation errors in the native code.
  • 🔶 Partial - The API is implemented but not fully compliant with the spec and/or there are known limitations.
  • ❌ Pending - The API is not implemented yet.
APIStatusNotes
console✅ Stable
fetch✅ Stable
URL✅ Stable
URLSearchParams✅ Stable
Request✅ Stable
Headers✅ Stable
Response✅ Stable
Blob✅ Stable
File✅ Stable
FormData✅ Stable
TextDecoder✅ Stable
TextDecoderStream✅ Stable
TextEncoder✅ Stable
TextEncoderStream✅ Stable
ReadableStream and supporting types✅ Stable
WritableStream and supporting types✅ Stable
TransformStream and supporting types🔶 PartialBack-pressure is not implemented
atob✅ Stable
btoa✅ Stable
performance.now()✅ Stable
performance.timeOrigin✅ Stable
crypto✅ Stable
crypto.subtle🔶 PartialOnly HMAC, MD5 and SHA algorithms are supported

Other supported APIs

The following (non-WinterCG) APIs are implemented and accessible in WinterJS:

APIStatusNotes
Service Workers Caches API✅ StableAccessible via caches. caches.default (similar to Cloudflare workers) is also available.
The current implementation is memory-backed, and cached responses will not persist between multiple runs of WinterJS.
Rust
Rust
Rust is a modern programming language focused on safety, speed, and concurrency. It prevents common bugs like null pointer dereferencing and data races, making it ideal for system programming and high-performance applications.
Create business apps like assembling blocks | ILLA Cloud
Create business apps like assembling blocks | ILLA Cloud
GitHub - 0x59616e/SteinsOS: An operating system written in Rust
GitHub - 0x59616e/SteinsOS: An operating system written in Rust
GitHub - j0ru/kickoff: Minimalistic program launcher
GitHub - j0ru/kickoff: Minimalistic program launcher
Workflow runs · rust-lang/rustup
Workflow runs · rust-lang/rustup
GitHub - paradigmxyz/artemis: A simple, modular, and fast framework for writing MEV bots in Rust.
GitHub - paradigmxyz/artemis: A simple, modular, and fast framework for writing MEV bots in Rust.
Workflow runs · sigp/lighthouse
Workflow runs · sigp/lighthouse
GitHub - flox/flox: Developer environments you can take with you
GitHub - flox/flox: Developer environments you can take with you
Unified Architecture - OPC Foundation
Unified Architecture - OPC Foundation
MaidSafe
MaidSafe
ttyperacer / terminal-typeracer · GitLab
ttyperacer / terminal-typeracer · GitLab
GitHub - cloudhead/rx: 👾 Modern and minimalist pixel editor
GitHub - cloudhead/rx: 👾 Modern and minimalist pixel editor
GitHub - rust-ethereum/ethabi: Encode and decode smart contract invocations
GitHub - rust-ethereum/ethabi: Encode and decode smart contract invocations
GitHub - watchexec/watchexec: Executes commands in response to file modifications
GitHub - watchexec/watchexec: Executes commands in response to file modifications
GitHub - osa1/tiny: A terminal IRC client
GitHub - osa1/tiny: A terminal IRC client
GitHub - sergree/whatbpm: 💓 Today's Trending Values for EDM Production
GitHub - sergree/whatbpm: 💓 Today's Trending Values for EDM Production
GitHub - rsaarelm/magog: A roguelike game in Rust
GitHub - rsaarelm/magog: A roguelike game in Rust
GitHub - autonomys/subspace: Subspace Network reference implementation
GitHub - autonomys/subspace: Subspace Network reference implementation
GitHub - nicohman/eidolon: Provides a single TUI-based registry for drm-free, wine and steam games on linux, accessed through a rofi launch menu.
GitHub - nicohman/eidolon: Provides a single TUI-based registry for drm-free, wine and steam games on linux, accessed through a rofi launch menu.
GitHub - shshemi/tabiew: A lightweight, terminal-based application to view and query delimiter separated value formatted documents, such as CSV or TSV files.
GitHub - shshemi/tabiew: A lightweight, terminal-based application to view and query delimiter separated value formatted documents, such as CSV or TSV files.
GitHub - joamag/boytacean: A GB emulator that is written in Rust 🦀!
GitHub - joamag/boytacean: A GB emulator that is written in Rust 🦀!
GitHub - chaosprint/glicol: Graph-oriented live coding language and music/audio DSP library written in Rust
GitHub - chaosprint/glicol: Graph-oriented live coding language and music/audio DSP library written in Rust
GitHub - wasmerio/winterjs: Winter is coming... ❄️
GitHub - wasmerio/winterjs: Winter is coming... ❄️
GitHub - withoutboats/notty: A new kind of terminal
GitHub - withoutboats/notty: A new kind of terminal
GitHub - cfal/shoes: A multi-protocol proxy server written in Rust (HTTP, HTTPS, SOCKS5, Vmess, Vless, Shadowsocks, Trojan, Snell)
GitHub - cfal/shoes: A multi-protocol proxy server written in Rust (HTTP, HTTPS, SOCKS5, Vmess, Vless, Shadowsocks, Trojan, Snell)
GitHub - eigerco/beerus: A stateless trustless Starknet light client in Rust 🦀
GitHub - eigerco/beerus: A stateless trustless Starknet light client in Rust 🦀
GitHub - quilt/etk: evm toolkit
GitHub - quilt/etk: evm toolkit
GitHub - pop-os/system76-power: System76 Power Management
GitHub - pop-os/system76-power: System76 Power Management
GitHub - Limeth/ethaddrgen: Custom Ethereum vanity address generator made in Rust
GitHub - Limeth/ethaddrgen: Custom Ethereum vanity address generator made in Rust
The Tor Project / Core / Arti · GitLab
The Tor Project / Core / Arti · GitLab
Production
Production
Rust
More on Rust

Programming Tips & Tricks

Code smarter, not harder—insider tips and tricks for developers.

Error Solutions

Turn frustration into progress—fix errors faster than ever.

Shortcuts

The art of speed—shortcuts to supercharge your workflow.
  1. Collections 😎
  2. Frequently Asked Question's 🤯

Tools

available to use.

Made with ❤️

to provide resources in various ares.