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

Refactor examples to build a single binary #805

Merged
merged 5 commits into from
Jan 13, 2025
Merged

Conversation

cBournhonesque
Copy link
Owner

@cBournhonesque cBournhonesque commented Jan 12, 2025

We previously did a refactor where the example mode was entirely defined by features. (i.e. start as client if only the client feature is enabled, etc.).
This caused some issues:

  • if you want to run as server and then as client, it causes a recompile because the set of features is different, which is annoying
  • on Windows, this would cause 2 binaries to be created with the same path, which causes an error.
  • Rust Analyzer uses the default features, so if you compile the binaries with the 'client' or 'server' feature it would cause RustAnalyzer to rebuild afterwards

To avoid this, I am changing all examples to run with all features enabled, and the user can choose the 'mode' of operation via a CLI argument.

@cBournhonesque cBournhonesque added the C-Example A change/addition to an example label Jan 13, 2025
@cBournhonesque cBournhonesque merged commit 6f067b5 into main Jan 13, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Example A change/addition to an example
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant