softeners: platforms: use ctor to register platforms#68
Draft
talhaHavadar wants to merge 1 commit intomainfrom
Draft
softeners: platforms: use ctor to register platforms#68talhaHavadar wants to merge 1 commit intomainfrom
ctor to register platforms#68talhaHavadar wants to merge 1 commit intomainfrom
Conversation
abe30dd to
780808c
Compare
5a3c48e to
f3b2a63
Compare
780808c to
eaced62
Compare
f3b2a63 to
5f58092
Compare
6290bab to
9a357b5
Compare
5f58092 to
df19773
Compare
17d7394 to
de28c96
Compare
df19773 to
8269b5d
Compare
Base automatically changed from
sparse/talhaHavadar/dfx-mgr-softener/slice/proc_macro
to
main
July 17, 2025 15:21
Collaborator
Author
|
parking this PR as per our discussion the other day (we dont like magic in summary 😄 ) |
8269b5d to
195372a
Compare
`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>
195372a to
45e1ed1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ctoris 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.