Thanks to visit codestin.com
Credit goes to docs.wavedash.com

Skip to main content
The wavedash.toml file defines your game project settings for the Wavedash CLI.

File location

Create wavedash.toml in your project root. The CLI looks for it in the current directory by default, or you can specify a path with --config.

Basic structure

game_id = "your-game-id"
branch = "production"
upload_dir = "./exports/web"

[godot]
version = "4.5-stable"

Required fields

FieldTypeDescription
game_idstringYour game’s ID from the Wavedash Developer Dashboard
branchstringThe branch to push builds to
upload_dirstringPath to your built game files (relative to config file)
Find your game ID in the Wavedash Developer Dashboard.

Engine configuration

You must include exactly one engine section. This tells Wavedash how to load and run your game.

Godot

[godot]
version = "4.5-stable"
FieldTypeDescription
versionstringGodot version (e.g., “4.5-stable”, “4.4-stable”)
Export your Godot project as HTML5. The upload_dir should contain the exported .html, .pck, .wasm, and .js files.

Unity

[unity]
version = "6000.0.2f1"
FieldTypeDescription
versionstringUnity version (e.g., “6000.0.2f1”)
Build your Unity project for WebGL. The upload_dir should contain the Build folder with index.html and the Build/ subfolder.

Custom

[custom]
version = "1.0.0"
entrypoint = "game.js"
FieldTypeDescription
versionstringYour game’s version number
entrypointstringJavaScript file that initializes your game (must be inside upload_dir)
Use the custom engine for HTML5 games, js-dos games, or any web-based game with a JavaScript entry point.
Example entrypoint:
game.js
(async function () {
  const target = document.getElementById("wavedash-target");

  // Create a container for your game
  const container = document.createElement("div");
  container.id = "game-container";
  container.style.width = "100%";
  container.style.height = "100%";
  target.appendChild(container);

  // Load any required libraries
  await window.WavedashJS.loadScript("./lib/library.js");
  window.WavedashJS.updateLoadProgressZeroToOne(0.5);

  // Load your game script
  await window.WavedashJS.loadScript("./game-bundle.js");
  window.WavedashJS.updateLoadProgressZeroToOne(1.0);

  // Initialize your game
  Game.init("game-container");

  // REQUIRED
  // Signal that loading is complete
  window.WavedashJS.loadComplete();
})();

Multiple configurations

For different deployment targets, create separate config files:
project/
├── wavedash.toml           # Production config
├── wavedash.staging.toml   # Staging config
└── wavedash.dev.toml       # Development config
Use them with the --config flag:
wvdsh build push --config wavedash.staging.toml

Path resolution

The upload_dir path is resolved relative to the location of the wavedash.toml file, not the current working directory. Example:
project/
├── config/
│   └── wavedash.toml    # upload_dir = "../build"
└── build/
    └── index.html