godot_dart
godot_dart copied to clipboard
🐞 Issue: Godot Dart Extension Loads, But Project Not Detected.
GOAL
I attempted to automate the setup of the Godot Dart extension using a devcontainer and a script (install.sh).
The goal was to verify that:
-
The extension compiles and loads correctly
-
A Dart project inside
res://src/is properly detected by Godot Editor -
A minimal Dart script (hello_node.dart) runs correctly in Godot
Setup Details
- OS: Ubuntu 22.04 (host), tested inside VSCode DevContainer and native environment
- Godot: 4.4-stable (headless and GUI)
- Dart: 3.7.x installed via APT (Google’s official channel)
- Repository cloned with
--recurse-submodules
Compilation of:
libgodot_dart.so via CMake ✅
libdart_dll.so via dart run build_runner build ✅
Dart bindings (godot_dart_scripts.g.dart) generated ✅
Directory structure:
isomap_godot_dart/
├── addons/
│ └── godot_dart/
│ ├── godot_dart.gdextension
│ ├── libdart_dll.so
│ └── libgodot_dart.so
├── src/
│ ├── pubspec.yaml
│ ├── lib/
│ │ ├── hello_node.dart
│ │ └── hello_node.g.dart
│ └── godot_dart_scripts.g.dart
├── project.godot
├── main.tscn
What Works ✅ Compilation steps succeed ✅ Editor launches using:
LD_LIBRARY_PATH=$PWD/addons/godot_dart:$LD_LIBRARY_PATH godot -e
✅ The extension loads — confirmed by this dialog:
The Godot Dart extension has been loaded in the project, but no Dart project was found.
Would you like to create a Dart project?
🚫 Problem
The extension does not detect the valid Dart project even though:
-
res://src/pubspec.yamlexists with a proper project name -
lib/ and
godot_dart_scripts.g.dartare present -
build_runnercompleted successfully -
The Dart script is attached to a node in a
.tscnscene
Additionally:
-
Attempting to manually link the script in the scene fails silently
-
No "Hello from Dart" message ever prints in
_ready()
Expected
-
When a valid Dart project with proper structure and generated bindings is present under res://src/, the editor should:
-
Recognize the project automatically
-
Not prompt to "Create Dart project"
-
Allow scripts like hello_node.dart to be attached and executed
Steps to Reproduce
-
Clone repo with
--recurse-submodules -
Run the automated setup script (see example below)
-
Open Godot editor as shown
-
Observe Dart project detection failure
Possible Causes
-
The extension might be expecting a specific folder or file pattern
-
pubspec.yamlparsing logic may be failing silently -
Detection might rely on a .
dart_toolfolder or some build artifact that’s not well documented
Suggestion Could you clarify:
-
What minimal structure or metadata is required for the extension to recognize a Dart project?
-
What path is expected for the Dart project: must it be exactly
res://src/? -
Does the name: in
pubspec.yamlinfluence detection logic?
If helpful, I can provide:
Full install.sh i used
A sample clean project zip or GitHub repo
Thanks a lot for your work on this awesome bridge between Godot and Dart 🙏
Let me know if you'd like to include a GitHub Gist, file, or screenshots too — I can help write that part or clean it further.
Screenshot
Hi @dexterBEN!
Thanks for the throrough issue!
For now the Dart module must be in res://src/, and will check for a pubspec.yaml and a main.dart file in the root of the module. Having a main.dart file is required as that's how godot_dart initializes some of its internal libraries. You can copy the main.dart directly from here: https://github.com/fuzzybinary/godot_dart/blob/main/src/assets/src/main.dart
In fact, that whole assets folder is basically the skeleton for a Godot Dart project.
Lastly, make sure you run dart pub get before running Godot.
I've been trying to make this simpler and have the addon do all the work for this for you, but I haven't been able to get it done yet.
Hi @fuzzybinary
Sorry for the delay of the answer, after following your recommandation, i don't see the popup here
and here the action i perform ⬇
https://jumpshare.com/s/AyK7bmBkiDgCYzQoFuYs
Hey @dexterBEN
I forgot I made this, which may help. I'll try to get around to linking it in the main documentation when I get a chance.
I wasn't able to watch your whole video tonight (I'll try tomorrow) but it looks like at first glance you may be holding the extension in a separate folder, and you're creating a regular Dart package. For now, I would avoid that, as I'm not sure whether holding the extension in a separate folder works, and there are some pub packages you need for Godot Dart that aren't part of the setup instructions (because they're included in the pubspec.yaml included in the extension). Specifically, you need godot_dart and godot_dart_build. These are unlisted packages because they're useless without the extension running in Godot.
Hi again @fuzzybinary 👋
Thanks for your previous reply and for the video – it really helped!
I followed the exact same steps as shown in the video:
- Created a fresh Godot project via the editor
- Downloaded the latest zip archive from your CI artifact
👉 CI Artifact Link - Extracted everything into the project
- Ran
dart pub get,build_runner build, andbuild_runner watch - Launched the Godot editor
However, I encountered a couple of issues:
🔧 1. Dart pubspec.yaml version mismatch
The pubspec.yaml inside the archive specifies:
dependencies:
godot_dart: ^0.9.0
dev_dependencies:
godot_dart_build: ^0.7.0
These versions don’t seem to exist (or are not resolvable), so dart pub get fails with:
After checking on pub.dev, the latest available version appears to be ^0.6.0. So I manually downgraded the dependencies to:
godot_dart: ^0.8.0
godot_dart_build: ^0.6.0
After that, dart pub get and the subsequent build_runner steps succeeded without any issue.
💥 2. libstdc++ version mismatch when launching Godot
When launching the Godot editor, I get the following error:
ERROR: Can't open dynamic library: libgodot_dart.so.
Error: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found
It seems like the precompiled libgodot_dart.so was built using a newer compiler (probably GCC 12 or later),
while my system (Ubuntu 22.04) only has GLIBCXX_3.4.30.
I understand that this can be fixed by rebuilding the extension locally, but I thought it might be useful to mention it in case other users hit the same issue.
💡 Suggestion: DevContainer to ease setup
Since I was initially working on automating the setup via a VSCode DevContainer, I was thinking:
Would it make sense to provide a DevContainer setup that:
-
Installs the proper version of GCC / libstdc++ to match the expectations
-
Builds the extension locally to avoid binary incompatibility
-
Provides Dart + required tools (build_runner, dart pub, etc.)
This could make the onboarding experience smoother and reproducible for new users or contributors, especially across Linux/Mac/Windows setups.
Let me know what you think — and thanks again for your awesome work on this project 🙏
Hi @dexterBEN,
I would love to provide a DevContainer, but it's unfortuantely outside of my expertise. Also building the extension locally is... not easy (as you've seen). It requires you pull down and patch a version of Dart, which is huge repo.
Can Ubuntu 22.04 install the later version of GLIBC? If so, we can put the package requirements in the setup instructions. Alternatively, I could try to downgrade the compiler used in the github action (it is indeed GCC 13: https://github.com/fuzzybinary/godot_dart/actions/runs/14828149592/job/41624406485)
Hi @fuzzybinary 👋
Thanks again for your previous message and the archive you shared.
I understand when you say
outside of my expertise
But just to clarify:
- The DevContainer setup uses a devcontainer.json file to define a Docker-based development environment,
- The
**postCreateCommand**in that file automatically runs an install.txt script right after the container is initialized. - This means all builds and configurations happen inside the container, independently from the host system.
✅ What I'm trying to build inside the container
The goal is to build:
-
**libgodot_dart.so**(fromsrc/cpp) -
libdart_dll.so(fromsrc/dart_dll) -
All Dart bindings and intermediate artifacts (via
ffigen, build_runner, etc.)
All of this happens inside the container, and once complete, the resulting files are copied to the root of the Godot project (following your example)
🛠️ What's inside the container
-
Base image: Ubuntu 22.04 (i use it as a base image could be something else)
-
Installed tools (via apt):
clang,gcc,cmake,scons, git,build-essential,libx11-dev,libgl1, etc. -
Dart SDKis installed via the official Google repository
📜 Steps performed by install.sh inside the container
-
Installs all required system dependencies (
build tools,libs, etc.) -
Installs Dart SDK
-
Clones godot_dart using
--recurse-submodules -
Runs dart pub get in:
-
godot_dart
-
godot_dart_build
-
binding_generator (plus dart run bin/binding_generator.dart)
-
Builds libdart_dll.so from src/dart_dll using build_runner
-
Builds godot-cpp using SCons
-
Compiles libgodot_dart.so using cmake
-
Copies all resulting shared libs to the root of the Godot project
-
Generates
**godot_dart.gdextension**manually at the root
❌ The current issue
Despite following your setup and using the shared .zip archive structure:
- The build fails with the following error:
fatal error: dart_dll.h: No such file or directory
-
This occurs during the build of
dart_bindings.cpp,becausedart_dll.his missing and doesn’t seem to be generated by build_runner or any other step. -
I confirmed that dart run build_runner build completes successfully, but does not generate any
dart_dll.h.
❓ Question
-
Could you clarify where dart_dll.h is supposed to come from?
-
Are there additional steps or missing dependencies required to generate it?
-
Is there a specific output directory structure expected by the C++ extension?
Any insight you could provide would be greatly appreciated, especially regarding the expected outputs from dart_dll.
🧩 About compiler versions
Also, regarding what you say:
Alternatively, I could try to downgrade the compiler used in the github action
I don't think it's necessary — since the goal is to build everything from inside a DevContainer, we can control the toolchain version independently.
So the version of gcc, glibc, or other build tools used in the GitHub Action doesn't have to match the user’s host system.
Instead, it would help more to document what’s strictly required to make the local build succeed (headers, structure, expected generated files, etc.), and it ensure the container handles all that.
Thanks again for your work on this project.
I understand how much effort it takes to maintain something like this.
Hi @dexterBEN
👍 I think I see what you're trying to do, and since you're doing the effort, I'm more than happy to accept a PR to include this once it's working. I'm not sure I'll have it be the recommended installation process, but it still might be useful for some.
dart_dll.h is supplied by the dart_shared_library artifact, which may suffer from the same LibC issue as this package (it's built in a very similar way). The fetch_dart command pulls the latest artifacts from that repository, which will include a libdart_dll.so as well as the headers.
Here's the actual steps the install script should use (I've made some corrections to your process from above)
📜 Steps performed by install.sh inside the container Installs all required system dependencies (build tools, libs, etc.)
- Installs Dart SDK
- Clones godot_dart using --recurse-submodules
Build dart_shared_library and copy artifacts
In the repo, this is done by the fetch_dart script which grabs the latest artifacts from Github.
- Clone
dart_shared_library - Build Dart with the
build_dartscript indart_shared_library. This buildslibdart_dll.so - Copy the resulting
libdart_dll.so(ordart_dll.dll) todart-dll. - Copy the needed include files from the Dart SDK Code in
sdk/runtime/include--dart_api.handdart_tools_api.h. - Copy the needed include files from the
dart_shared_librarytodart-dll--dart_dll.h
Build godot_dart
- Runs dart pub get in:
- godot_dart
- godot_dart_build
- binding_generator
- Run
binding_generator - Builds libdart_dll.so from src/dart_dll using build_runner ~~4. Builds godot-cpp using SCons~~ This is not needed. This will be built by CMake for us.
- Compiles libgodot_dart.so using cmake
- Copies all resulting shared libs to the root of the Godot project (only
libdart_dll.soandgodot_dart.soare needed. I believe godot-cpp is statically linked) - Copy the
src/assetsfolder to the root of the Godot project (this will have the .gdextension in it as well as icons that are used by the extension)
Hi @fuzzybinary
Hope you are well ?
It's been a while, i face some issue but i thinks i have something interesting.
Just for the reminder, the goal was for me to propose to have a devcontainer for godo-dart.
I’ve been iterating on a devcontainer setup to make it trivial to clone the sample project, pull the prebuilt godot_dart extension artifact, and get a working Godot+Dart loop.
Below is what’s working, what we learned, remaining rough edges, and suggested improvements.
✅ What’s working
- Project boots and runs “Hello from Dart 👋”
Using the prebuilt godot_dart artifact, Godot 4.4 on Linux, and Dart 3.8/3.9, the sample scene loads and the Dart script runs as expected.
- One-shot codegen/build
dart run build_runner build --delete-conflicting-outputs succeeds and produces the expected *.g.dart files.
- Install script
scripts/install.sh:
-
Installs Dart from Google’s apt repo.
-
Downloads the latest successful Actions artifact named
godot-extension(with optional manual URL fallback). -
Unzips it at the project root, writes a
godot_dart.gdextension, and runsdart pub get+build_runner(when used inside the container).
Produces a tidy install.log for diagnosis.
- Devcontainer
VS Code container builds cleanly, installs useful extensions (Godot Tools, Dart, C/C++), and sets PUB_CACHE (container-local) so pub get is fast/stable inside the container.
🔎 Key discoveries (important)
1. Single “authority” for Dart operations
The biggest gotcha came from path incoherence between host and container:
-
Running
pub get/build_runnerin the container writes absolute URIs insrc/.dart_tool/package_config.jsonlike/workspaces/godot_dart_sample_app/.pub-cache/... -
Launching Godot on the host then fails with
Error when reading '/workspaces/.../godot_dart-0.10.0/lib/godot_dart.dart': No such file or directorybecause those container paths don’t exist on the host. -
Conversely, running pub/build on the host writes host paths and works fine when Godot also runs on the host.
Conclusion: Do all Dart resolution (pub + build_runner + Godot) in the same environment. Either:
-
A. Host-first:
run pub get+build_runneron the host and run Godot on the host (what we shipped as the “working” flow), or -
B. Container-first: run everything inside the devcontainer (including Godot), and do not run host-side builds.
Mounting a shared .pub-cache does not solve this: the paths embedded in package_config.json must match the runtime environment, irrespective of cache content.
2. VS Code “Problems” list was misleading
Before codegen ran and before reattaching the script in the editor, the Dart LSP flagged missing symbols (e.g., Sprite2D, ExtensionTypeInfo, GodotScript).
After running build_runner and reattaching the script, the errors cleared and the scene ran. (The Godot editor also auto-fixed missing .uid files by falling back to text paths—harmless.)
3. Analyzer/SKD version warnings
We consistently see:
Analyzer language version: 3.1.0
SDK language version: 3.8.x/3.9.x
Build still succeeds, but the warning is noisy.
This comes from conservative constraints in the sample’s pubspec.yaml vs current SDK.
🧯 Bugs/instability we hit (and how we fixed them)
- “No such file or directory” for
package:godot_dart/godot_dart.dart
Root cause: package_config.json pointing to container paths while running Godot on the host.
Fix: Clean and redo the build in the same environment that runs Godot. For host-first flow:
cd src
rm -rf .dart_tool pubspec.lock
PUB_CACHE="$PWD/../.pub-cache" dart pub get
PUB_CACHE="$PWD/../.pub-cache" dart run build_runner build --delete-conflicting-outputs
cd ..
LD_LIBRARY_PATH="$PWD:$LD_LIBRARY_PATH" godot -e
- Crash earlier in the process about entry-points / type info
This was prior to the clean rebuild/reattach; resolved by:
- running `build_runner`,
- ensuring `@GodotScript()` + `@pragma('vm:entry-point')` are present,
- reattaching the script in Godot (the editor warning about invalid UID switched to the text path and loaded fine).
- Devcontainer “invalid mount” error (first attempt)
I originally tried to bind-mount the host .pub-cache into the container.
If the host folder didn’t exist yet, Docker failed at container start.
We dropped the bind mount and used a container-local cache instead. (And even with a working mount, the package_config.json path-mismatch problem would remain.)
🧭 Recommended workflow (repeatable)
Pick one and stick to it:
A) Host-first (what we verified end-to-end)
-
Run
pub get+build_runneron the host (commands above). -
Launch Godot on the host:
LD_LIBRARY_PATH="$PWD:$LD_LIBRARY_PATH" godot -e
-
In the devcontainer, either:
-
don’t run
pub get/build_runner, or -
guard them in
install.shwith an env var (e.g.,SKIP_DART_SETUP=1) so the container never rewritespackage_config.jsonwith/workspaces/...paths.
-
B) Container-first (if you want full isolation)
-
Keep install.sh as is (does pub get + build_runner in container).
-
Add Godot to the container and run it there with X11 passthrough:
LD_LIBRARY_PATH="/workspaces/godot_dart_sample_app:$LD_LIBRARY_PATH" godot -e
- Never run host-side builds.
✨ Improvements that would help contributors
1. Document the “single environment” rule clearly
A short “Troubleshooting: No such file or directory for package:godot_dart” section that explains the package_config.json absolute path behavior and the two supported workflows would save folks a lot of time.
2. Guarded install script
Accept SKIP_DART_SETUP=1 to skip pub get/build_runner.
This lets users choose Host-first easily while still benefitting from artifact download.
3. Optional: run Godot inside the devcontainer
Ship a tiny script to fetch the Godot editor in the container so users can choose Container-first end-to-end without touching the host.
4. Raise analyzer constraint
Updating dev_dependencies to a newer analyzer (or documenting why we pin) would remove the recurring warning:
dev_dependencies:
analyzer: ^9.0.0
(Only if compatible with the current generator; otherwise add a note.)
5. VS Code UX tip
Mention that Dart LSP errors can appear before build_runner runs and/or before reattaching the script in Godot; they typically clear after those steps.
📌 Current state summary
-
Prebuilt
godot_dartartifact loads correctly. -
HelloNodesample runs and prints “Hello from Dart 👋”. -
Devcontainer builds fine and can set up Dart + deps.
-
The main pitfall is path mismatch when mixing host/container for Dart ops vs Godot runtime. We’ve verified two clean flows to avoid that.
If you’d like, I can follow up with:
-
a PR adding (a) the clarified docs, (b) the
SKIP_DART_SETUPguard, and (c) a minimal “run Godot in container” script; and -
a tiny check in
scripts/install.shthat prints which environment producedpackage_config.jsonand why mixing will fail.
Thanks for the great project—this setup feels close to “clone → build → run” now.
{
"name": "Godot + Dart (prebuilt extension)",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"customizations": {
"vscode": {
"extensions": [
"Dart-Code.dart-code",
"geequlim.godot-tools",
"ms-vscode.cpptools",
//"dart-code.dart-code",
"ms-vscode.cmake-tools"
]
}
},
"remoteUser": "vscode",
"updateRemoteUserUID": false,
"postCreateCommand": "bash scripts/install.sh",
"runArgs": [
"-e",
"DISPLAY",
"-v",
"/tmp/.X11-unix:/tmp/.X11-unix"
],
// "mounts": [
// "type=bind,source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename}"
// ]
"containerEnv": {
"PUB_CACHE": "/workspaces/${localWorkspaceFolderBasename}/.pub-cache"
}
}
#!/usr/bin/env bash
set -euo pipefail
LOG_FILE="install.log"
exec > >(tee -a "$LOG_FILE") 2>&1
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
CACHE_DIR="${PROJECT_ROOT}/.cache"
mkdir -p "$CACHE_DIR"
echo "==> Project root: ${PROJECT_ROOT}"
echo "==> User: $(whoami)"
# Dépendances système minimales (on lance Godot sur l'hôte)
sudo apt-get update
sudo apt-get install -y curl ca-certificates unzip git jq gpg wget
# Installer Dart (repo officiel)
if ! command -v dart >/dev/null 2>&1; then
echo "==> Installing Dart SDK"
echo "deb [signed-by=/usr/share/keyrings/dart.gpg] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main" | sudo tee /etc/apt/sources.list.d/dart_stable.list
curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg
sudo apt-get update && sudo apt-get install -y dart
fi
echo 'export PATH="/usr/lib/dart/bin:$PATH"' | sudo tee /etc/profile.d/dart.sh >/dev/null
echo "==> Dart: $(dart --version || true)"
# Charger .env si présent (GITHUB_TOKEN, GODOT_DART_ARTIFACT_URL)
if [ -f "${PROJECT_ROOT}/.env" ]; then
set -a; . "${PROJECT_ROOT}/.env"; set +a
fi
REPO="fuzzybinary/godot_dart"
ARTIFACT_NAME="godot-extension"
ZIP_OUT="${CACHE_DIR}/${ARTIFACT_NAME}.zip"
: "${GODOT_DART_ARTIFACT_URL:=}"
download_with_token() {
: "${GITHUB_TOKEN:?GITHUB_TOKEN manquant (.env)}"
echo "==> Fetching latest successful artifact"
runs="$(curl -fsSL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${REPO}/actions/runs?status=success&per_page=1")"
run_id="$(echo "$runs" | jq -r '.workflow_runs[0].id')"
[ -n "$run_id" ] && [ "$run_id" != "null" ] || { echo "No successful run."; return 1; }
arts="$(curl -fsSL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${REPO}/actions/runs/${run_id}/artifacts")"
aid="$(echo "$arts" | jq -r ".artifacts[] | select(.name==\"${ARTIFACT_NAME}\") | .id")"
[ -n "$aid" ] && [ "$aid" != "null" ] || { echo "Artifact not found."; return 1; }
echo "==> Downloading artifact id=$aid"
curl -fsSL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" \
-o "${ZIP_OUT}" \
"https://api.github.com/repos/${REPO}/actions/artifacts/${aid}/zip"
}
download_with_url() {
echo "==> Downloading artifact from URL"
curl -fL -o "${ZIP_OUT}" "${GODOT_DART_ARTIFACT_URL}"
}
echo "==> Downloading prebuilt extension"
if [ -n "${GITHUB_TOKEN:-}" ]; then
download_with_token || { [ -n "${GODOT_DART_ARTIFACT_URL}" ] && download_with_url || exit 1; }
else
[ -n "${GODOT_DART_ARTIFACT_URL}" ] && download_with_url || { echo "No token/URL."; exit 1; }
fi
echo "==> Unzipping into project root"
unzip -o "${ZIP_OUT}" -d "${PROJECT_ROOT}"
cat > "${PROJECT_ROOT}/godot_dart.gdextension" <<'EOF'
[configuration]
entry_symbol = "godot_dart_init"
compatibility_minimum = 4.2
[icons]
DartScript = "res://godot_dart/logo_dart.svg"
DartHotReload = "res://godot_dart/hot_reload.svg"
[libraries]
linux.debug.x86_64 = "res://libgodot_dart.so"
linux.release.x86_64 = "res://libgodot_dart.so"
windows.debug.x86_64 = "res://godot_dart.dll"
windows.release.x86_64 = "res://godot_dart.dll"
macos.debug = "res://libgodot_dart.dylib"
macos.release = "res://libgodot_dart.dylib"
EOF
# Première passe (générique)
if [ -d "${PROJECT_ROOT}/src" ]; then
echo "==> dart pub get (generic)"
(cd "${PROJECT_ROOT}/src" && dart pub get || true)
if [ -d "${PROJECT_ROOT}/src/lib" ]; then
echo "==> build_runner (generic, one-off)"
(cd "${PROJECT_ROOT}/src" && dart run build_runner build --delete-conflicting-outputs || true)
fi
else
echo "No ./src found after unzip."; exit 1
fi
# --- Sync Dart deps for workspace (container-friendly, PUB_CACHE local projet) ---
echo "==> Syncing Dart deps into project-local PUB_CACHE"
PUB_CACHE="${PROJECT_ROOT}/.pub-cache"
(
cd "${PROJECT_ROOT}/src"
PUB_CACHE="$PUB_CACHE" dart pub get
if [ -d "lib" ]; then
PUB_CACHE="$PUB_CACHE" dart run build_runner build --delete-conflicting-outputs || true
fi
)
echo "==> Dart deps synced (PUB_CACHE=${PUB_CACHE})"
# -------------------------------------------------------------------------------
echo "✅ Done."
Hi @dexterBEN
I'm a little out of my depth here, but all of the suggestions you made sound reasonable to me. Like I said, I don't think this will be the recommended install approach, but In your PR I would love if you would add documentation on how to take this approach and link it in the main README.
Also be aware, I am trying to move away from the Godot Dart doing the compilation, similar to how Dart 3.10 is now separating the dart and dartvm executables, I want Godot Dart to download the proper Dart SDK and use it to build a kernel file, then use that instead.
That said, some issues with that approach have cropped up so it may not be coming any time soon. I just wanted to make you aware if it affects your thinking or approach on this issue.
Look forward to your PR.