Skip to content

Make bindings more ideomatic.#2

Merged
zigster64 merged 8 commits into
starfederation:mainfrom
AndrewKraevskii:dev
Jul 3, 2026
Merged

Make bindings more ideomatic.#2
zigster64 merged 8 commits into
starfederation:mainfrom
AndrewKraevskii:dev

Conversation

@AndrewKraevskii

Copy link
Copy Markdown
Contributor

This one is based on top of #1 which are more critical.
Read commit descriptions for more info on each specific change.

Andrew Kraevskii added 8 commits June 23, 2026 12:23
This is faster and we don't need to use global Io extra time.
This is just managed version of array_hashmap.String.
Making it unmanaged tells uset in api what passing it as parameted doesn't modify it. 

I think we can mitigate a bit more code by adding
initElement(arena, &.{.{key1, value1, .{key2, value2}}}); init method to that datastructure.
It already exists on StaticStringMap so i don't think anyone would be agains it.
This gives users more flexability on where to actually put buffer and how large to actually make buffer.
And also makes Message non intrusive data structure which allows nicer initialization.
This also allows to remove default field values which removes footgun of incorrect initializations.
They actually just don't test anything.
@zigster64 zigster64 self-assigned this Jul 2, 2026
@zigster64

Copy link
Copy Markdown
Collaborator

as discussed on D* discord - use atomic instead of global var with lock

will follow this one up with a fix to the random number gen, which currently isnt threadsafe in the demo app (not that that is a big problem for the demo app, but its technically incorrect)

@zigster64 zigster64 merged commit c03f983 into starfederation:main Jul 3, 2026
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.

2 participants