Skip to content

Conversation

@talhaHavadar
Copy link
Collaborator

@talhaHavadar talhaHavadar commented Jul 15, 2025

ctor is a library that marks a function or static variable as a library/executable constructor. This uses OS-specific linker sections to call a specific function at load time.


Let's also discuss the need for ctor, I dont really want to add more dependencies into the project but I can understand the benefit this brings. It helps integrating more platforms easier and also prevents small mistakes such as adding a platform but not really registering it.

But it also adds a bit of magic into the application as well so it hides the implementation detail of registering platforms from the developer.

So I feel like this is a nice to have feature but not really mandatory.

@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/proc_macro branch from abe30dd to 780808c Compare July 15, 2025 12:28
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/ctor branch 2 times, most recently from 5a3c48e to f3b2a63 Compare July 15, 2025 14:55
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/proc_macro branch from 780808c to eaced62 Compare July 15, 2025 14:55
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/ctor branch from f3b2a63 to 5f58092 Compare July 15, 2025 15:18
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/proc_macro branch 2 times, most recently from 6290bab to 9a357b5 Compare July 15, 2025 15:37
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/ctor branch from 5f58092 to df19773 Compare July 15, 2025 15:39
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/proc_macro branch 2 times, most recently from 17d7394 to de28c96 Compare July 15, 2025 15:43
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/ctor branch from df19773 to 8269b5d Compare July 15, 2025 15:44
@talhaHavadar talhaHavadar marked this pull request as ready for review July 15, 2025 15:51
Base automatically changed from sparse/talhaHavadar/dfx-mgr-softener/slice/proc_macro to main July 17, 2025 15:21
@talhaHavadar
Copy link
Collaborator Author

parking this PR as per our discussion the other day (we dont like magic in summary 😄 )

@talhaHavadar talhaHavadar marked this pull request as draft July 17, 2025 15:22
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/ctor branch from 8269b5d to 195372a Compare July 17, 2025 15:39
`ctor` is a library that Marks a function or static variable as a
library/executable constructor. This uses OS-specific linker sections
to call a specific function at load time.

Signed-off-by: Talha Can Havadar <talha.can.havadar@canonical.com>
@talhaHavadar talhaHavadar force-pushed the sparse/talhaHavadar/dfx-mgr-softener/slice/ctor branch from 195372a to 45e1ed1 Compare July 18, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants