Samples for a Meson workshop
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fractal-sdl
hello-sdl
hello-world
.gitignore
LICENSE
Readme.md
emscripten.txt
meson.build

Readme.md

Install dependencies

Install Emscripten

wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
sudo tar -xf emsdk-portable.tar.gz -C /opt/

source /opt/emsdk-portable/emsdk_env.sh
emsdk update
emsdk install latest
emsdk activate latest

Install Git, Ninja & Meson

# Fedora
sudo dnf install git ninja-build python3-pip
# Ubuntu
sudo apt install git ninja-build python3-pip

# Shared
sudo pip3 install meson

Build and run

Build from CLI

git clone https://github.com/prozum/meson-samples.git && cd meson-samples
meson --cross-file=emscripten.txt . build
ninja -C build

Run from CLI

python -m SimpleHTTPServer &
xdg-open http://localhost:8000/build
# Select a sample folder

Install and run Gnome Builder flatpak (Optional)

# Fedora
sudo dnf install flatpak
# Ubuntu
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update
sudo apt install flatpak

# Shared
flatpak install --from https://git.gnome.org/browse/gnome-apps-nightly/plain/gnome-builder.flatpakref?h=stable
flatpak run org.gnome.Builder

Cool Emscripten Demos