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

Remove requirement to set up dylib #16

Closed
lee-orr opened this issue Sep 21, 2023 · 3 comments · Fixed by #17 or #19
Closed

Remove requirement to set up dylib #16

lee-orr opened this issue Sep 21, 2023 · 3 comments · Fixed by #17 or #19

Comments

@lee-orr
Copy link
Owner

lee-orr commented Sep 21, 2023

Setting up a crate as a dylib can break compilation in certain situations when it's not actually used as a dylib, especially on windows - leading to a "too many symbols" error. In Crossroad Blues I worked around it by creating a separate crate that was a dylib, and imported the game crate which only existed as an rlib.

For the CLI, it would be useful if we could avoid the need for that extra crate.

@lee-orr lee-orr linked a pull request Sep 21, 2023 that will close this issue
@lee-orr lee-orr reopened this Sep 25, 2023
@lee-orr
Copy link
Owner Author

lee-orr commented Sep 25, 2023

The solution I had set up doesn't work well with cross-compilation, so I'm going to aim for a different solution - possibly adding a "setup" command that sets up the extra crate and stuff like that....

@lee-orr
Copy link
Owner Author

lee-orr commented Sep 25, 2023

Rather than changing the behavior here - I will adjust the docs, since I want to give users control of the structure of their projects as much as possible

@lee-orr lee-orr closed this as completed Sep 25, 2023
@lee-orr lee-orr reopened this Sep 25, 2023
@lee-orr
Copy link
Owner Author

lee-orr commented Sep 25, 2023

Found a different solution by creating a temporary Cargo.toml with dylib when compiling/running via the CLI, and reverting to the original when the run is done. This prevents the compilation issues that can occur when you have dylib set on the crate but not used as part of the compilation itself...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant