All Projects → mbasso → Asm Dom Boilerplate

mbasso / Asm Dom Boilerplate

Licence: mit
A simple boilerplate to start using asm-dom without configuration.

Projects that are alternatives of or similar to Asm Dom Boilerplate

Asm Dom
A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)
Stars: ✭ 2,604 (+5214.29%)
Mutual labels:  webassembly, wasm, asmjs, virtual-dom, vdom
Dcmjs
dcmjs is a javascript cross-compile of dcmtk (dcmtk.org).
Stars: ✭ 92 (+87.76%)
Mutual labels:  webassembly, wasm, asmjs
Squark
Rust frontend framework, for web browser and more.
Stars: ✭ 162 (+230.61%)
Mutual labels:  wasm, asmjs, virtual-dom
Percy
Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
Stars: ✭ 1,856 (+3687.76%)
Mutual labels:  webassembly, wasm, virtual-dom
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (+185.71%)
Mutual labels:  webassembly, wasm, asmjs
Emscripten Docker
Docker image with Emscripten to compile ASM.js and WebAssembly
Stars: ✭ 92 (+87.76%)
Mutual labels:  webassembly, wasm, asmjs
Awesome Wasm Langs
😎 A curated list of languages that compile directly to or have their VMs in WebAssembly
Stars: ✭ 2,966 (+5953.06%)
Mutual labels:  webassembly, wasm, asmjs
TypeScriptXX
🧷 Stay safe! Type-safe scripting for C++ using TypeScriptToLua and CMake with auto-generated declarations.
Stars: ✭ 33 (-32.65%)
Mutual labels:  webassembly, wasm, asmjs
Wasmsign
A tool to add and verify digital signatures to/from WASM binaries
Stars: ✭ 31 (-36.73%)
Mutual labels:  webassembly, wasm
Rhai
Rhai - An embedded scripting language for Rust.
Stars: ✭ 958 (+1855.1%)
Mutual labels:  webassembly, wasm
Photon
⚡ Rust/WebAssembly image processing library
Stars: ✭ 963 (+1865.31%)
Mutual labels:  webassembly, wasm
Cppwasm Book
📚 WebAssembly friendly programming with C/C++ -- Emscripten practice
Stars: ✭ 956 (+1851.02%)
Mutual labels:  webassembly, wasm
Wasm Check
TypeScript / JavaScript library for detect WebAssembly features in node.js & browser
Stars: ✭ 30 (-38.78%)
Mutual labels:  webassembly, wasm
Wasmboy
Game Boy / Game Boy Color Emulator Library, 🎮written for WebAssembly using AssemblyScript. 🚀Demos built with Preact and Svelte. ⚛️
Stars: ✭ 963 (+1865.31%)
Mutual labels:  webassembly, wasm
Smartcircle
✂️Automatically determine where to crop a circular image out of a rectangular.
Stars: ✭ 29 (-40.82%)
Mutual labels:  webassembly, wasm
Wonders
🌈 Declarative JavaScript framework to build command-line applications.
Stars: ✭ 34 (-30.61%)
Mutual labels:  virtual-dom, vdom
Mal
mal - Make a Lisp
Stars: ✭ 8,287 (+16812.24%)
Mutual labels:  makefile, webassembly
Node Wasm
Import and use wasm in node
Stars: ✭ 28 (-42.86%)
Mutual labels:  webassembly, wasm
Wasm Sort
WebAssembly sort algorithms compiled by C.
Stars: ✭ 34 (-30.61%)
Mutual labels:  webassembly, wasm
Json2excel
Generate excel file from json data
Stars: ✭ 40 (-18.37%)
Mutual labels:  webassembly, wasm

asm-dom-boilerplate

A simple boilerplate to start using asm-dom without configuration. This includes:

  • asm-dom
  • CPX support: JSX like syntax in C++
  • parcel-bundler
  • autoprefixer

The boilerplate automatically compiles C++ code to WebAssembly and asm.js, the client will dinamically require the first if supported, the second otherwise.

Prerequisites

Please make sure to have emcc set as an environment variable and the lastest version of node to make parcel work. So, to validate the installation, please run the following commands:

node -v
npm -v
make -v
emcc -v
java -version

Getting started

Clone and install dependencies:

git clone https://github.com/mbasso/asm-dom-boilerplate.git
cd asm-dom-boilerplate
npm install # or make install

# if you are using windows, you have to make a little change to the Makefile in the root of the project, just open it and follow the instructions at the top

npm start # or make start

Then open http://localhost:1234 to see the example app. You can now edit index.cpp and rerun npm start to recompile and see the changes.

Building for Production

# just run:
make

This will compile your C++ and copy your index.html to the dist folder which you can deploy.

Makefile

By default the boilerplate preprocess the .cpp files in the src folder with gccx and automatically includes them when compiling. If you want to include external dependencies or add some C flags, you can modify the Makefile in the root of the project.

CSS

Parcel uses PostCSS plugins to manage CSS assets. The boilerplate includes autoprefixer for vendor prefixing, you can find and modify the PostCSS setup in .postcssrc.

Authors

Matteo Basso

Copyright and License

Copyright (c) 2018, Matteo Basso.

asm-dom-boilerplate source code is licensed under the MIT License.

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].