All Projects → MaxGraey → Wasm Check

MaxGraey / Wasm Check

Licence: mit
TypeScript / JavaScript library for detect WebAssembly features in node.js & browser

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Wasm Check

Terrarium Templates
Template and example projects for Fastly Labs Terrarium https://wasm.fastlylabs.com
Stars: ✭ 21 (-30%)
Mutual labels:  webassembly, wasm
Node Wasm
Import and use wasm in node
Stars: ✭ 28 (-6.67%)
Mutual labels:  webassembly, wasm
Awesome Wasm Zh
WebAssembly(wasm)资源精选
Stars: ✭ 838 (+2693.33%)
Mutual labels:  webassembly, wasm
Notecalc3
NoteCalc is a handy calculator trying to bring the advantages of Soulver to the web.
Stars: ✭ 879 (+2830%)
Mutual labels:  webassembly, wasm
Bionic
** Bionic - An Ionic CLI clone for Blazor projects ** moved to:
Stars: ✭ 28 (-6.67%)
Mutual labels:  webassembly, wasm
Wasmer Php
🐘🕸️ WebAssembly runtime for PHP
Stars: ✭ 796 (+2553.33%)
Mutual labels:  webassembly, wasm
Wasm2kt
Web Assembly to Kotlin and Java converter. Allows to compile a C or C++ program/library, and generate a Kotlin or Java program/library.
Stars: ✭ 18 (-40%)
Mutual labels:  webassembly, wasm
Awesome Wasm
😎 Curated list of awesome things regarding WebAssembly (wasm) ecosystem.
Stars: ✭ 6,377 (+21156.67%)
Mutual labels:  webassembly, wasm
Zemeroth
😠⚔️😈 A minimalistic 2D turn-based tactical game in Rust
Stars: ✭ 940 (+3033.33%)
Mutual labels:  webassembly, wasm
Wasm Json Toolkit
[ORPHANED] A small toolkit for converting wasm binaries into json and back.
Stars: ✭ 23 (-23.33%)
Mutual labels:  webassembly, wasm
Webassembly
A minimal toolkit and runtime to produce and run WebAssembly modules.
Stars: ✭ 786 (+2520%)
Mutual labels:  webassembly, wasm
Wagon
wagon, a WebAssembly-based Go interpreter, for Go.
Stars: ✭ 882 (+2840%)
Mutual labels:  webassembly, wasm
Raylib
A simple and easy-to-use library to enjoy videogames programming
Stars: ✭ 8,169 (+27130%)
Mutual labels:  wasm, webassembly
Markdown Wasm
Markdown parser and HTML generator implemented in WebAssembly, based on md4c
Stars: ✭ 833 (+2676.67%)
Mutual labels:  webassembly, wasm
Ssvm
SSVM is a high performance, extensible, and hardware optimized WebAssembly Virtual Machine for cloud, AI, and blockchain applications.
Stars: ✭ 751 (+2403.33%)
Mutual labels:  webassembly, wasm
Gameboy
🎮 Game Boy emulator written in Rust
Stars: ✭ 17 (-43.33%)
Mutual labels:  webassembly, wasm
Graphql Client
Typed, correct GraphQL requests and responses in Rust
Stars: ✭ 620 (+1966.67%)
Mutual labels:  webassembly, wasm
Pib
PHP in Browser (powered by WebAssembly)
Stars: ✭ 649 (+2063.33%)
Mutual labels:  webassembly, wasm
Viper
[WIP] A Pythonesque language with a design that focuses on efficiency and expressiveness. Compiles to WebAssembly
Stars: ✭ 23 (-23.33%)
Mutual labels:  webassembly, wasm
Webrtc
Pure Go implementation of the WebRTC API
Stars: ✭ 8,399 (+27896.67%)
Mutual labels:  webassembly, wasm

NPM registryNPM license

Library for detect WebAssembly post-MVP features in NodeJS & Browser. Small and with zero dependencies.

About post-MVP WebAssembly features

https://github.com/WebAssembly/design/blob/master/FutureFeatures.md#tracking-issues

Tests on Canary with flags:

Enable some experimental features for Chrome Canary (Mac):

/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --js-flags="--experimental-wasm-eh"

Support feature detections

Install

yarn add wasm-check

or

npm i wasm-check

Usage

Check supported WebAssembly version

import * as check from 'wasm-check';
// or
// const check = require('wasm-check');

console.log(check.support()); // default MVP
console.log(check.support(1)); // same
console.log(check.support(2)); // version 2 (for future)

Check supporting streaming compilation

import * as check from 'wasm-check';

console.log(check.supportStreaming);

Get all post-MVP WebAssembly features

import * as check from 'wasm-check';

const features = { ...check.feature };
console.log(features);

Output:

{
  bigInt: true,
  bulk: true,
  exceptions: false,
  mutableGlobal: true,
  multiValue: true,
  saturateConversions: true,
  signExtensions: true,
  tailCall: false,
  threads: false,
  simd: false,
  references: false,
  typeReflection: false,
  funcReferences: false
}

Or check concrete feature

import * as check from 'wasm-check';

console.log(check.feature.simd); // has SIMD support?
console.log(check.feature.tailCalls); // has tail call optimization support?

TODO

  • [ ] GC integration feature check
  • [ ] Interface Types feature check
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].