Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework cli #374

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Rework cli #374

wants to merge 7 commits into from

Conversation

tDwtp
Copy link
Contributor

@tDwtp tDwtp commented Jun 21, 2021

Please note: I had to export (or hide) certain symbols:

  • gravity_json.h (required) these are used mutliple times inside different exposed functions, some even beeing essential.
  • gravity_utils.h (optional and handy) these are really handy for expanding gravity and are simple to understand.
  • gravity_debug.h (optional) for (custom/gravity-specific) editors these symbols will come in handy ~~
  • gravity_compiler.h#gravity_compiler_ast I dont think you wanted me to export that much, this would require gravity_token.h and gravity_node.h to be (maybe) mostly exposed to make any sense of it. Subsequently there would be more headers. I chose to hide it, as it is not used anywhere.

Regarding gravity_vm_register_args: I would expose optionals only for the dll (please evaluate this). but for the executable it would not make any sense. besides this is a little less dependent on the optionals. The call does not seem to do anything which requires this specific optional anyway? Maybe it should be moved to gravity_vm.h/*.c

I added Build-Targets and cleaned up the exports. I also want to add a dyn folder for the dynamically linkable libraries... currently it looks cluttered.

Also: we should export the computed_property_*/convert_value2* functions. They are really helpful and a headder should either have alle symbols exported or none.

SOMETHING needs to be bundled with the executable to make expansion possible. a *.lib/lib*.a is the absolute minimum. You have to die one death. headers should also be included. however... on windows a dllimport is needed. Thats why I created the gravity_common.h header. We can choose to put it there. (also it makes exported symbols not include gravity_value...)

This is the absolute minimum. For Platforms other than Windows, dynamic linking is required as they do not allow dlopen for executables. libraries cannot link against executables either.
cli will now use a static library exporting all its symbols (`gravityapi_sx`) ready for use in plugins
We do not need to export these symbols as we are not linking dynamically anymore.
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.

None yet

1 participant