# WinterJS **Repository Path**: lineCodeJm/WinterJS ## Basic Information - **Project Name**: WinterJS - **Description**: WinterJS 是用 Rust 编写的 JavaScript Service Worker - **Primary Language**: Rust - **License**: Not specified - **Default Branch**: dependency-fix - **Homepage**: https://www.oschina.net/p/winterjs - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-11-05 - **Last Updated**: 2023-11-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Wasmer logo
# WinterJS The JavaScript server that runs Service Workers according to the [Winter Community Group specification](https://wintercg.org/). > Note: WinterJS is not officially endorsed by WinterCG, despite sharing "Winter" in their name. There are many [runtimes supporting WinterCG](https://runtime-keys.proposal.wintercg.org/), WinterJS being one among those ## Running WinterJS with Wasmer The WinterJS server is published in Wasmer as [`wasmer/winterjs`](https://wasmer.io/wasmer/winterjs). You can run the HTTP server locally with: ```shell wasmer run wasmer/winterjs --net --mapdir=tests:tests tests/simple.js ``` Where `simple.js` is: ```js addEventListener('fetch', (req) => { return "hello"; }); ``` ## Running WinterJS Natively You can run WinterJS natively by simply doing ```shell cargo run -- tests/simple.js ``` And then access the server in https://localhost:8080/ # How WasmerJS works Wasmer Winter is powered by [SpiderMonkey](https://spidermonkey.dev/) and [Axum](https://github.com/tokio-rs/axum) to bring a new level of awesomeness to your Javascript apps. To compile the app to WebAssembly WinterJS is using the [WASIX](https://wasix.org) standard.