About this project

2dog is a project that inverts the usual relationship between Godot and .NET: instead of Godot loading .NET, a .NET application hosts Godot. It packages a slightly modified libgodot as a library that .NET applications can embed, so the .NET runtime is in charge of the process. Because .NET drives the application, developers get browser publishing via browser-wasm, ordinary dotnet tooling, and automation such as unit tests. Pre-built native libraries are shipped, so users do not need to compile Godot themselves. A notable outcome is the ability to export Godot C# projects to the web. Getting started options: - For an existing Godot project, run `dnx 2dog add` inside the project directory to add nested .NET hosts, then `dotnet run --project MyGame.2dog`. Running the command again adds another host. - For a new project, run `dnx 2dog new MyGame`, then `dotnet run --project MyGame.2dog`. A `dotnet new` template is also provided via `dotnet new install 2dog && dotnet new 2dog -n MyGame`. - The familiar Godot editor workflow still works for visual scene editing. Web export: publish the generated .NET app to browser-wasm using the wasm-tools workload, then serve the AppBundle directory with dotnet-serve. The documentation site covers the development loop, deployment options, and current limitations. Project structure: 2dog adds subdirectories containing "hosts" that run the Godot project using libgodot rather than export templates or the editor executable. A typical layout includes the Godot project root with project.godot and the game C# assembly, plus a desktop .NET host, a browser WebAssembly host, and a headless xUnit test host. Each nested host carries a .gdignore so Godot ignores it, keeping the original game project unchanged while each host has its own entry point and dependencies. Requirements and status: - .NET SDK 10.0 or later with the wasm-tools workload - Godot 4.7.x official .NET editor only when visual scene editing is desired - Supported build platforms: win-x64, linux-x64, osx-arm64 - Supported RIDs for published builds: win-x64, linux-x64, osx-arm64, browser-wasm - Packages available on NuGet and GitHub releases Development of 2dog itself: clone with submodules and build native and .NET packages using the provided poe task. A showcase demo and test suite are included. The project documents its use of LLMs across different parts of the codebase, including review gating and human-signed releases via Trusted Publishing.