这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@brandonros
Copy link

I'm not very good at CMake so let me know how this can be better.

@brandonros brandonros changed the title also build a shared library optionally build a shared library Oct 9, 2021
@brandonros
Copy link
Author

I'm not quite sure what the "on library load" function should be, let alone the named exports we need to now export. main() would need to be converted, and we'd need a way to access "should-be-globals" like TJSRuntime *qrt and JSContext *ctx

@brandonros
Copy link
Author

$ nm build/libtjs.dylib | grep TJS_GetJSContext
000000000000fb84 T _TJS_GetJSContext
$ nm build/libtjs.dylib | grep TJS_GetRuntime
000000000000fb8c T _TJS_GetRuntime

Not bad.

@saghul
Copy link
Owner

saghul commented Oct 11, 2021

Good start! I think we bend some macro helper to export symbols on the library.

Alternatively, the binary itself could and be like a library. Node does this for example.

@KaruroChori
Copy link
Contributor

In theory #517 made this redundant right?

@brandonros brandonros closed this May 22, 2024
@brandonros brandonros deleted the patch-1 branch May 22, 2024 12:30
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.

3 participants