Coder Social home page Coder Social logo

emscripten-examples's Introduction

Emscripten-examples

Examples using Emscripten. The purpose of this repo is to show how to convert simple CPP code to a format which can be executed within a web browser.

Technologies used

  • CPP
  • Emscripten
  • Python 2.7.*
  • HTML + CSS + JavaScript

Useful links

Setup

Build

  • cd emscripten
  • source ./emsdk_env.sh
  • cd ..
  • python build_all.py
  • cd examples
  • http-server
  • Open up a webpage and view http://localhost:8080 or http://127.0.0.1:8080 to view the examples directory
  • Make sure you only build within the same terminal you set the source otherwise emscripten will error

Donate

If you found this useful, and/or this has saved you time/money, please donate to one of the following charities:

emscripten-examples's People

Contributors

marcusbelcher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

emscripten-examples's Issues

fibonacci: script.js:8 Uncaught TypeError: app.generate is not a function

Marcus,

This is the closest example I can find to my little WASM exercise but I get this error:

main.wasm.js:9 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
(anonymous) @ main.wasm.js:9
main.wasm.js:9 falling back to ArrayBuffer instantiation
(anonymous) @ main.wasm.js:9
script.js:8 Uncaught TypeError: app.generate is not a function
    at onSubmit (script.js:8)
    at HTMLFormElement.onsubmit ((index):14)
onSubmit @ script.js:8
onsubmit @ (index):14

What am I doing wrong?

Thanks,

Phil.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.