Git Product home page Git Product logo

cpython-emscripten's Introduction

Python in the browser

The aim of this project is to make Python usable in the browser. This is done using the standard Python implementation (CPython) compiled with emscripten to generate an Web Assembly library.

The benefits of this approach are:

  • This gives access to a full Python implementation.
  • Wasm can be pretty fast, so the interpreter is still quite useful.
  • It supports existing extension modules.
  • It supports Cython for speeding up the code and binding to C/C++.

If you have a Python application using SDL (1 or 2) and maybe OpenGLES 2 then this project could help you deliver it via the browser.

Prerequesits

The build requires a complete development toolchain for the build system. This is used to build the portions of Python required for bootstrapping the complete Python build.

Emscripten is also required for the cross compilation. Emsdk 2.0.1 has been tested, and there are known issues with 2.0.2 - 2.0.14.

Some of the examples use Cython which can be installed with pip. Versions 0.20.1 and above have been used successfully.

Credits

Many of the patches and instructions are derived from the excellent work of Marat Dukhan on the EmCPython project.

Python Versions

3.6.13

cpython-emscripten's People

Contributors

dgym avatar mdboom avatar

Watchers

 avatar

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.