outfox/2dog
关于
2dog is Godot in .NET 🦴
游戏与模拟器实测星标增长
- 24小时
- +1
- 7天
- +5
- 15天
- +8
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
🦴 2dog is Godot... just backward!
Godot normally loads .NET, now .NET loads Godot.
2dog packages Godot as a library (a slightly modified libgodot)
that your .NET application hosts. Keep your Godot project exactly as it is, and run it on the desktop, in the
browser, inside a .NET UI, or under xUnit and NUnit with a real Godot engine, all with dotnet and your IDE.
📖 Read the Documentation at 2dog.dev
2dog is available fully precompiled from NuGet.org and as GitHub Releases. (no need to clone this repo)
Contributing or building 2dog from source
Poe is the build entry point; tasks live in pyproject.toml.
uv run --locked installs the Python tools from uv.lock; global.json
pins the .NET SDK and optional workload set. Install uv, Git LFS, that .NET SDK,
and your platform's Godot build dependencies.
Configuration checks and releases also need Nushell.
Configure GitHub SSH access for the Godot submodule before cloning.
On Windows, enable Developer Mode
and run git config --global core.symlinks true before cloning.
git clone --recursive https://github.com/outfox/2dog
cd 2dog
git lfs pull
uv run --locked poe build-all
build-all builds the host's Godot editor, C# glue and native libraries, then packs
platform packages, bindings, the engine and integrations in dependency order. Packages
land in packages/, and the desktop/test solution filter is restored last.
| Command | When to use it |
|---|---|
uv run --locked poe build-local |
Incremental native work after a full build of the same precision; skips the editor and glue, then repacks. |
uv run --locked poe build |
Repack platform and managed packages from existing native outputs. Unbuilt platforms get empty stubs. |
uv run --locked poe build-managed |
Repack bindings, engine and integrations using existing platform packages; no C++ build. |
A checkout builds and consumes its own packages at one fixed version: revision 950 with the Godot
label, such as 4.8.0.950-rc1 (TwoDogLocalRevision in Directory.Build.props). It is never
published, so packages/ always holds what the demos and tests ask for. Run poe build once per
clone or worktree; a restore that finds nothing there names that command. CI, pulled CI packages and
release tags use their computed versions. Projects outside this tree cache packages by version, so
after a repack clear their cache entry or pass -p:TwoDogLocalRevision=<n> to pack another number.
Add --precision double to these build tasks for matching double-precision natives
and managed packages. Direct dotnet commands then need -p:TwoDogPrecision=double.
Native build options go after --; for example, to keep an SCons cache and debug symbols:
uv run --locked poe build-all -- --cache-path temp/scons-cache --debug-symbols yes
For managed work without compiling Godot, use
uv run --locked poe pull-packages --run RUN_ID with an authenticated GitHub CLI (gh).
Replace RUN_ID with a successful CI run matching the checkout's Godot pin and package
versions; add --precision double if needed. This imports validated packages and matching
SDK/bindings, records CI package versions and restores the desktop/test solution.
After importing, use build-managed or direct dotnet commands to keep the downloaded
platform packages. Run CI again if its package artifacts have expired.
dotnet run --project demos/showcase/showcase.2dog
dotnet test 2dog.tests.slnf
uv run --locked poe test-build-configuration
Install optional workloads with uv run --locked poe install-workloads wasm-tools
(substitute android or ios maui-ios as needed), using the committed workload-set pin.
uv run --locked poe --help lists the mobile build tasks and other commands.
Release
After changing the Godot submodule, run uv run --locked poe sync-versions and commit
its version/pin updates with the submodule bump. This sync does not create a release.
Release from a clean, up-to-date main checkout in your own shell, with your Git
signing key and push access to 2dog and its Godot fork:
uv run --locked poe release --dry-run # preview both release tags locally
uv run --locked poe release # release all configured lines
uv run --locked poe release --lines 4.7 # release only the 4.7 line
Run one release at a time. Each batch shares one revision from the tags on origin.
The command signs the tags against the current source commit, protects the Godot fork
pins, and pushes the 2dog tags together. Each line reuses its native revision while
its inputs match. godot-lines.json defines the other lines.
Each tag starts its own CI run. CI verifies the tag against
the release signers and applies its Godot pin and package
versions to the build checkout. To reproduce that checkout locally, check out
the tag and run nu scripts/release.nu --apply-tag <tag>. This updates the
working tree and index without creating a commit.
CI calls the same Poe recipes, reuses verified native builds by input fingerprint, and uses Blacksmith caches and sticky disks. As soon as packing finishes, it stages a complete package set on a GitHub prerelease and uploads it to int.nugettest.org, so manual testing can start while both precisions are tested. The independent iOS Release/AOT check runs on the staged packages. Promotion requires the whole tag run to succeed, including its Release Gate (the test verdicts) and that iOS check. Promote one or more tags with an authenticated GitHub CLI:
uv run poe promote v4.7.2.189 v4.8.0.188-beta3
To post the GitHub release notes to Discord, pass one or more tags. Each release gets its own message.
uv run poe release-notes v4.7.2.189 v4.8.0.188-beta3
For CI on another line without releasing, run
uv run --locked poe release --ci --line 4.7; delete its temporary ci/4.7/<commit>
branch after the run.
Dogs and robots are nice
🦴♥️👾 2dog is proudly made by human maintainers and contributors. We permit extensive use of LLMs:
- Forked
libgodotfeatures/fixes consist of similar amounts of human-written and machine-written code - Commits/PRs are reviewed & gated by both humans and machines (over 90%/90%) and signed by humans
- .NET Host applications are mostly human-written, while boilerplate assets (e.g. XAML) are mostly machine-written
- Configurations, tools, smoke tests, CSS, MSBuild XML, and CI workflows are overwhelmingly LLM-maintained
- Documentation aims to be human-authored, but new feature docs are generated and later gradually rewritten
- Releases on NuGet use Trusted Publishing and may only be invoked via direct human interaction
Acknowledgements
Continuous Integration compute graciously supported by Blacksmith.
Code Review compute graciously supported by Cubic.
探索相关项目
加载中…