Pico

About

  1. What is Pico?
  2. Who made Pico?
  3. How do I use Pico?

What is Pico?

Pico provides a straightforward way to compile a C++ project to a webassembly based webpage. It does not provide system libraries, not even dynamic memory allocation!

Pico uses the LLVM toolset to compile C and C++ code into a webassembly binary. Pico is essentially a set of C++ and C scripts that does the bindings between C and HTML for you, it is very lightweight and experimental, additionally it provides some simple .bat and .sh scripts that compile and link your program so you don't have to bother wrangling with cmake or another build system to create simple applications.

Who made Pico?

Pico is an experimental project made by Richard.

How do I use Pico?

First, to set up the pico environment, it is recommended to use Visual Studio Code and open the .workspace file in the root of this repository. This method allows you to use intellisense to guide your code!

Then, to build your Pico app, run the build.sh or the build.bat scripts which automatically build your C++ program and link it with the Pico framework.

Once your program is built, to run your application, open the index.html with a web server and it should run and print errors to the console!

This might seem complicated at first, but once your Pico environment is set up, all that is required is a ./build.sh and a webpage refresh.

Useful Links

  1. https://aransentin.github.io/cwasm/