Skip to content

notnullgames/cart_nelua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a basic example cart in Nelua for the null0 game-engine.

usage

Carts run natively, and on the web. This repo will auto-publish to github-pages on push, so users can check out your cart without installing anything.

They can also install the native runtime and use it to run your cart.

github

There are 2 actions:

  • Publish demo to github-pages - this happens on any push
  • Attach current version of your cart to any releases that are created (like here)

developing

Make sure you have wasi-sdk installed and WASI_SDK_PATH set to it's location (eg /opt/wasi-sdk.)

Then you can do this:

nelua --cflags="-I ." -L . "src/main.nelua" -r --cc "$WASI_SDK_PATH/bin/clang" -o src/main.wasm
cd src
zip -r ../webroot/mygame.null0 . -x '*.nelua' '.DS_Store'

You can also use cmake (recommended) to build a complete cart:

cmake -B build -DCMAKE_TOOLCHAIN_FILE="${WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake" -DCMAKE_BUILD_TYPE=Release
cmake --build build

You will find your cart in webroot/mygame.null0

If you have node installed, you can also get a nice watching-webseerver, locally:

npm start

After this, create a github-release, and your cart will show up on releases (like here).

About

Example cart for null0 using Nelua

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Generated from notnullgames/cart_c