Skip to content

Implement easy C externs#1402

Open
mattisboeckle wants to merge 11 commits into
mainfrom
feature/c-externs
Open

Implement easy C externs#1402
mattisboeckle wants to merge 11 commits into
mainfrom
feature/c-externs

Conversation

@mattisboeckle

@mattisboeckle mattisboeckle commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Enables writing extern definitions such as

extern def glfwCreateWindow(width: C::Int, height: C::Int, title: C::String, monitor: C::Ptr, share: GLFWwindow): GLFWwindow = c "glfwCreateWindow"

which has to match a linked c function that has the correct name and types.

In this specific case

GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share);

This will automatically generate a wrapper function for said C function, which can then be called from effekt.
There are some selected types and utility functions in effekt.effekt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant