Add base files for bindings

Add base files for C++ and D that will interface with the existing C integration.
This commit is contained in:
Aidan C. Mullen 2025-03-05 00:10:19 -05:00
parent f474eb7478
commit dd8e9d4296
9 changed files with 74 additions and 1 deletions

24
.gitignore vendored
View file

@ -11,6 +11,9 @@
!build.sh
!CHANGELOG
!configure.ac
!dub.sdl
!dub.selections.json
!extension_api.json
!LICENSE
!Makefile.am
!README
@ -39,6 +42,7 @@
/engine/bin/*
!/engine/bin/librtr.gdextension
!/engine/bin/libsb.gdextension
# /engine/img
!/engine/img/
@ -56,6 +60,26 @@
!/src/main.gdextension
!/src/main.h
# /src/init
!/src/init
/src/init/*
!/src/init/bind.d
# /src/init/cpp
!/src/init/cpp
/src/init/cpp/*
!/src/init/cpp/bind.cpp
# /src/init/d
!/src/init/d
/src/init/d/*
/src/init/d/bind.d
!/src/init/d
# /res
!/res/
/res/*

8
README
View file

@ -24,6 +24,10 @@ Build
- Git
- GNU Autotools
- UNIX Shell
- GCC (with G++)
- LDC
- DUB
- Tubolent W2C2 (optional; testing only)
1.) Install the dependencies listed above.
@ -35,6 +39,10 @@ Build
3.) Run "build.sh" within a UNIX shell.
Using this configuration, the project will be compatible with all major
operating systems and WebAssembly, which can be useful for transpiling and
new platform testing.
Project organized in conformance to the Straightforward C Project Standard 5
(SCPS5).

View file

@ -2,6 +2,11 @@
# Build Script
# Prepare to Build Project
mkdir ./bld
mkdir ./bld/out
# Run Autotools
libtoolize
aclocal

12
dub.sdl Normal file
View file

@ -0,0 +1,12 @@
name "spruce-basin"
description "Source material."
authors "AUTHORS"
copyright "Copyright © 2025, AUTHORS"
license "proprietary"
dependency "godot-dlang" version="~master"
configuration "spruce-basin" {
targetType "dynamicLibrary"
dflags "-dllimport=defaultLibsOnly" platform="windows-ldc2"
targetName "bld/out/spruce-basin"
mainSourceFile "src/init/bind.d"
}

7
dub.selections.json Normal file
View file

@ -0,0 +1,7 @@
{
"fileVersion": 1,
"versions": {
"godot-dlang": "~master",
"utf_bc": "0.2.1"
}
}

View file

@ -0,0 +1,10 @@
[configuration]
entry_symbol = "Godot-DLang"
compatibility_minimum = "4.4"
[libraries]
linux.64 = "bind.so"
darwin.64 = "bind.dylib"
windows.64 = "bind.dll"

View file

@ -106,7 +106,7 @@ text = "To-Do:
- Use C API to implement interactive interface; this API is available via GDExtension, which has bindings available for an extended
selection of languages, which may all interact with each other via this API.
- Components that require speed, such as procedural generation and most core logic, should be implemented in C99/C++11; these libraries may then
be called from a more expressive language, such as Tim Apple's Swift.
be called from a more expressive language, such as D or a WASM object.
- These issues will be migrated to the Forgejo instance.
- Button for copyright notices in bottom-left corner."

6
src/init/bind.d Normal file
View file

@ -0,0 +1,6 @@
import std;
void main()
{
printf("Start.");
}

1
src/init/cpp/bind.cpp Normal file
View file

@ -0,0 +1 @@