Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Rewrite to use data segments instead of ctor? #13
However, there are a number of issues due to
I have not tried to make it work in WASM yet, but I did make a proof-of-concept for Windows/OSX/Linux that seems to work. Check it out! It uses platform specifics to get pointers to the start and end of a custom data segment where the submitted data is stored. The linker concatenates all data in a custom data segment during the linking phase so that data from all modules can be iterated over. The idea is to have a custom data segment for each type by mangling the type name - the proof of concept only uses a constant name. Presumably this is something that can be done by a proc macro.
Does this seem like something that is worth doing or are there known issues with this approach that I should be aware of?