godotengine / godotengine/godot-cpp
Binary bloat discussion
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
### Godot version
4.4-dev
### godot-cpp version
4.4-dev
### System information
wasm in particular
### Issue description
This is intended to primarily be a tracking issue looking at ways to reduce the binary size of these extension libraries. Intended to be an open discussion to followup on https://github.com/godotengine/godot-cpp/pull/1621
### Steps to reproduce
Compiling the simplest of extensions, a single file single including a single header results in a 2MB library (**Reviewer EDIT: macos universal library, i.e. 1MB for each architecture**). Example:
```c++
#include
class Example : public Node3D {
GDCLASS(Example, Node3D);
protected:
Vector2 position2;
static void _bind_methods() {
ClassDB::bind_method(D_METHOD("test_position"), &Example::test_position);
};
Vector2 test_position() const {
return position2;
};
Example() { };
virtual ~Example() {};
};
```
### Minimal reproduction project
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.