• Stars
    star
    844
  • Rank 51,863 (Top 2 %)
  • Language
    JavaScript
  • Created 8 months ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Winter is coming... ❄️

WinterJS

A 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'));
});

Running WinterJS Natively

You can run WinterJS natively by simply doing

cargo run -- tests/simple.js

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

How WasmerJS 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 early, pre-release software. It is currently not fully compliant with the WinterCG spec and the runtime itself is still a work in progress. It is not recommended to use WinterJS in production yet. 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.

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.
API Status Notes
console ✅ Stable
fetch 🔶 Partial Request needs to be stabilized before fetch can be considered Stable
URL ✅ Stable
URLSearchParams ✅ Stable
Request 🔶 Partial Request.formData does not support deserialization of multipart/form-data bodies
Headers ✅ Stable
Response ✅ Stable
Blob 🔶 Partial Blob.stream() is not implemented yet
File 🔶 Partial Blob must be stabilized before File can be considered stable
FormData ✅ Stable
TextDecoder ✅ Stable
TextDecoderStream ✅ Stable
TextEncoder ✅ Stable
TextEncoderStream 🔶 Partial Surrogate pairs spread across two chunks are not handled correctly
ReadableStream and supporting types ✅ Stable
WritableStream and supporting types ✅ Stable
TransformStream and supporting types 🔶 Partial Back-pressure is not implemented
atob ✅ Stable
btoa ✅ Stable
performance.now() ✅ Stable
performance.timeOrigin ❌ Pending
crypto ✅ Stable
crypto.subtle 🔶 Partial Only MD5 and SHA algorithms are supported

More Repositories

1

wasmer

🚀 The leading Wasm Runtime supporting WASIX, WASI and Emscripten
Rust
16,915
star
2

wasmer-go

🐹🕸️ WebAssembly runtime for Go
Go
2,679
star
3

wasmer-python

🐍🕸 WebAssembly runtime for Python
Rust
1,952
star
4

wasmer-php

🐘🕸️ WebAssembly runtime for PHP
PHP
964
star
5

wasmer-js

Monorepo for Javascript WebAssembly packages by Wasmer
Rust
828
star
6

kernel-wasm

Sandboxed kernel mode WebAssembly runtime.
C
702
star
7

wasmer-java

☕ WebAssembly runtime for Java
Java
544
star
8

awesome-wasi

😎 Curated list of awesome things regarding WebAssembly WASI ecosystem.
476
star
9

wasmer-ruby

💎🕸 WebAssembly runtime for Ruby
Rust
462
star
10

wasmer-postgres

💽🕸 Postgres library to run WebAssembly binaries.
Rust
392
star
11

wapm-cli

📦 WebAssembly Package Manager (CLI)
Rust
368
star
12

webassembly.sh

Open-source and installable PWA terminal powered by WebAssembly, WAPM, and Wasmer-JS 🖥
JavaScript
269
star
13

wasmer-rust-example

Example of WebAssembly embedding in Rust using Wasmer
Rust
163
star
14

ate

Distributed immutable data store with strong encryption and authentication
Rust
129
star
15

vscode-wasm

WebAssembly extension for VSCode
Rust
122
star
16

wai

A language binding generator for `wai` (a precursor to WebAssembly interface types)
Rust
110
star
17

rusty_jsc

Rust bindings for the JavaScriptCore engine.
Rust
86
star
18

wasmer-c-api

Example of the C API to embed the Wasmer runtime
C
76
star
19

io-devices-lib

Library for interacting with the Wasmer Experimental IO Devices
WebAssembly
51
star
20

wasmer-pack

Rust
47
star
21

sonde-rs

A library to compile USDT probes into a Rust library
Rust
44
star
22

old-docs.wasmer.io

Wasmer Documentation (for standalone and embedded use cases)
WebAssembly
41
star
23

wasmer-install

Wasmer Binary Installer https://wasmer.io/
Shell
39
star
24

loupe

Profiling tool for Rust code.
Rust
35
star
25

c-wasm-simd128-example

Example C++ repo emitting Wasm SIMD 128 instructions
C++
30
star
26

wasmer-nginx-example

This is a simple example of Nginx running with wasmer
HTML
29
star
27

wasmer-ocaml

OCaml bindings for Wasmer
OCaml
28
star
28

cargo-wasmer

A cargo sub-command for publishing Rust crates to the WebAssembly Package Manager.
Rust
24
star
29

wasm-fuzz

Fuzzer for Wasm and Wasmer
JavaScript
22
star
30

wasmer.io

The Wasmer.io website
JavaScript
21
star
31

wasmer-bench

This is a repo for benchmarking Wasmer (compilation & runtime)
Rust
20
star
32

wcgi-wordpress-demo

PHP
15
star
33

wcgi-php-template

PHP
14
star
34

setup-wasmer

GitHub action for setting up Wasmer
TypeScript
13
star
35

c-http-server

A very simple http server in c
JavaScript
13
star
36

rust-wasm-simd128-example

Example Rust repo emitting Wasm SIMD 128 instructions
Rust
10
star
37

wasm-debug

A runtime-independent crate for transforming Wasm-DWARF
Rust
9
star
38

docs.wasmer.io

The Wasmer Docs Website (website deployed using Wasmer Edge)
MDX
9
star
39

wasmer-terminal-js

The WebAssembly terminal, revamped!
Rust
7
star
40

rust-cli-app-example

Example CLI app written in rust for Wasmer
Rust
7
star
41

wapm-publish

GitHub action for publishing to WAPM
TypeScript
7
star
42

wasmer-rust-customabi-example

An example repo to demonstrate how to create a module with a custom ABI to then use it from an embedder
Rust
6
star
43

wasm-interface-cli

A binary for verifying Wasm interfaces
Rust
6
star
44

interface-types

The `wasmer-interface-types` crate
Rust
5
star
45

ewasm-workshop

Ewasm workshow with Wasmer Metering
Rust
5
star
46

sgp4

Rust
5
star
47

llvm-custom-builds

Sandbox to produce custom LLVM builds for various platforms
Shell
5
star
48

sha2

A WebAssembly interface to Rust's sha2 crate
Rust
5
star
49

cranelift

Cranelift code generator
Rust
4
star
50

wasm-python-api

WebAssembly Python standard API prototype
Python
4
star
51

python-flask-example

Sample Python Flask server for Wasmer Edge
Python
4
star
52

shared-buffer

An abstraction over buffers backed by memory-mapped files or bytes in memory
Rust
3
star
53

wcgi-rust-template

Rust
3
star
54

wasmer-toml

Split out the wapm.toml parsing from wasmerio/wapm-cli
Rust
3
star
55

wasmer-nightly

Nightly releases of Wasmer
3
star
56

llvm-build

LLVM Distribution for being used with Wasmer
3
star
57

js-service-worker-example

Sample for a js service worker running on Wasmer Edge.
JavaScript
3
star
58

wasi-tests

Integration tests for WASI
Rust
2
star
59

.github

Github profile
2
star
60

wasmer-js-example

Wasmer-JS example
2
star
61

edge-react-starter

Wasmer Edge + Vite + React + TS starter template. Deploy it like it's hot 🚀
CSS
1
star
62

rustfft

Rustfft for WASM, published on WAPM
Rust
1
star
63

inline-c

Rust
1
star
64

speed.wasmer.io

Speed tracker of Wasmer
CSS
1
star
65

windows-llvm-build

Build of LLVM in Windows
1
star
66

wasmer-edge-support

1
star
67

zig2wapm

CI script to clone zig/zig to wapm.io
Shell
1
star
68

wasm4-on-wapm

This is a demo repo to showcase how to upload your WASM-4 games to WAPM
1
star
69

wai-hashids

Hashids demonstration with WAI
Rust
1
star
70

astro-starter-a1d

Astro
1
star
71

flask-starter-324

Python
1
star