Skip to content

godot-bindings: dispatch on target OS instead of host OS (also supports Wasm)#1479

Merged
Bromeon merged 2 commits intomasterfrom
feature/wasm-artifact
Jan 11, 2026
Merged

godot-bindings: dispatch on target OS instead of host OS (also supports Wasm)#1479
Bromeon merged 2 commits intomasterfrom
feature/wasm-artifact

Conversation

@Bromeon
Copy link
Copy Markdown
Member

@Bromeon Bromeon commented Jan 10, 2026

Previously, gdextension-api internally selected the platform based on #[cfg(target_*)] directives. This always chose the host platform, since that dependency was used inside a build.rs script. Now, gdextension-api was updated to leave the choice to the caller for most flexibility (it could also check environment variables itself), which is the new code now added in godot-bindings.

As we now have a prebuilt Wasm artifact, it is now possible export to Wasm without api-custom, and thus without bindgen and the entire LLVM toolchain.

Relations:

@Bromeon Bromeon added this to the 0.5 milestone Jan 10, 2026
@Bromeon Bromeon added feature Adds functionality to the library c: tooling CI, automation, tools c: wasm WebAssembly export target labels Jan 10, 2026
@Bromeon Bromeon force-pushed the feature/wasm-artifact branch from 4d19d78 to f2287ce Compare January 10, 2026 23:50
…ts Wasm)

Previously, gdextension-api internally selected the platform based on #[cfg(target_*)]
directives. This always chose the host platform, since that dependency was used inside
a build.rs script. Now, gdextension-api was updated to leave the choice to the caller
for most flexibility (it could also check environment variables itself), which is the
new code now added in godot-bindings.
@Bromeon Bromeon force-pushed the feature/wasm-artifact branch from f2287ce to 33e8b1e Compare January 10, 2026 23:55
@GodotRust
Copy link
Copy Markdown

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1479

@Bromeon
Copy link
Copy Markdown
Member Author

Bromeon commented Jan 11, 2026

Tested it with dodge-the-creeps and Wasm export (nothreads). It works without api-custom.

@Bromeon Bromeon added this pull request to the merge queue Jan 11, 2026
Merged via the queue into master with commit abfa7b8 Jan 11, 2026
20 checks passed
@Bromeon Bromeon deleted the feature/wasm-artifact branch January 11, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: tooling CI, automation, tools c: wasm WebAssembly export target feature Adds functionality to the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[0.4.0] Windows Cross-Compilation Fails with pthread Type Size Assertions Add support for 32-bit

2 participants