Skip to main content

Setup

Download WASM-4:

📥 Windows📥 macOS📥 Linux

This contains the w4 command that will be used to create new projects and run games locally.

info

You can also install w4 with NPM by running npm install -g wasm4

Quickstart#

Let's go over creating a new project called hello-world for your chosen language. Use the dropdown menu to select a different language.

note

Porth is currently a work in progress language. Anything can change at any moment without notice.

To compile Porth projects you will need to download 4orth and add it to $PATH.

w4 new --porth hello-worldcd hello-world

Compile the .wasm cartridge:

make

Run it in WASM-4 with:

w4 run build/cart.wasm
tip

You can also use w4 watch to automatically watch for changes in source files and rebuild in real-time.

Next Steps#

Next let's take a look at some source code for Hello World.