Skip to content

Add online-mode Cargo feature#281

Merged
mat-1 merged 2 commits intomainfrom
online-mode-feature
Dec 1, 2025
Merged

Add online-mode Cargo feature#281
mat-1 merged 2 commits intomainfrom
online-mode-feature

Conversation

@mat-1
Copy link
Collaborator

@mat-1 mat-1 commented Nov 23, 2025

Closes #280.

Needs testing to make sure it actually works properly and doesn't break plugins.

Would've been nice to completely disable azalea-auth when this feature is disabled, but currently GameProfile and offline::generate_uuid are in azalea-auth. Maybe they could be moved to azalea-core and azalea-crypto later?

@aparatext
Copy link

Wouldn't it also disable the AES/RSA dependencies? Offline mode uses plaintext transport I think.

@mat-1
Copy link
Collaborator Author

mat-1 commented Nov 25, 2025

As of a few versions ago, offline-mode servers have the option to enable encryption (not sure why tbh), so the encryption-related dependencies are unfortunately still required.

I think rsa dependency can be removed since it's only used for chat signing though, so thanks for pointing that out. :)

@mat-1 mat-1 merged commit 6c110f2 into main Dec 1, 2025
3 checks passed
@mat-1 mat-1 deleted the online-mode-feature branch December 1, 2025 03:04
@mat-1
Copy link
Collaborator Author

mat-1 commented Dec 9, 2025

Would've been nice to completely disable azalea-auth when this feature is disabled, but currently GameProfile and offline::generate_uuid are in azalea-auth. Maybe they could be moved to azalea-core and azalea-crypto later?

I moved the offline module to azalea-crypto in ba3a883.

Moving GameProfile out of azalea-auth is trickier though, because moving it into azalea-core would add a relatively heavy dependency to azalea-auth (which is often used standalone).

One solution would be to significantly trim down azalea-core or add tons of feature flags, but this would just shift the problem I'm trying to solve (having lots of #[cfg(feature="...")] attrs). Another solution would be to make a new crate to put GameProfile in, but an entire crate just for that type doesn't feel like it would make sense. Not sure what the right solution here is.

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.

Consider adding a package flag for online mode

2 participants

Comments