Mentors: Dan Goodman <d.goodman@imperial.ac.uk>, Marcel Stimberg <marcel.stimberg@inserm.fr>, Benjamin Evans <B.D.Evans@sussex.ac.uk>
Skill level: Novice/intermediate
Required skills: HTML, JavaScript, basic C++ and Python
Time commitment: Flexible (175/350 hours)
About: Brian is a clock-driven spiking neural network simulator that is easy to learn, highly flexible, and simple to extend. Written in Python, it allows users to describe and run arbitrary neural and synaptic models without needing to write code in any other programming language. It is built on a code-generation framework that transforms model descriptions into efficient low-level code. WebAssembly is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web.
Brian’s code generation pipeline can generate C++ code, and the emscripten toolchain can compile this code into WebAssembly. This makes it possible to run simulations directly in a web browser, requiring no installation on the client side. We have recently created a proof-of-concept, brian2wasm (GitHub - brian-team/brian2wasm), showing the feasibility of this approach.
Aims: The aim of this project is to turn this proof-of-concept into a convenient tool for the wider community. In particular, the aims of this project are to:
- Improve the general workflow (e.g. detection/configuration of emscripten toolchain)
- Implement efficient data transfer between the WebAssembly simulation and the JavaScript code that displays the results
- Provide convenient tools for website customization and plot display
- Document the package and its usage
Additional goals for a 350h project:
- Set up an automatic test suite for brian2wasm
- Provide convenient tools for setting parameters at the start of the simulation (big project)
- Provide components for real-time interaction with Brian scripts, e.g. providing microphone or camera input to the Brian simulation and returning spikes or other data from the Brian simulation to the website (big project)
Project website: GitHub - brian-team/brian2wasm
Tech keywords: HTML, JavaScript, WebAssembly, emscripten, Python, C++