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 of serverside API #32

Open
1 of 11 tasks
xxshady opened this issue Nov 14, 2024 · 0 comments
Open
1 of 11 tasks

Rework of serverside API #32

xxshady opened this issue Nov 14, 2024 · 0 comments

Comments

@xxshady
Copy link
Owner

xxshady commented Nov 14, 2024

I plan to rewrite serverside API in some parts, make it more Rust idiomatic. Mostly the baseobject API will change, I really want to get rid of Rc<RefCell<...>

And rework is also needed because clientside API is in progress and it already looks different from current serverside one

  • internal logging of altv crate should not set logger implementation and log level
    log::set_max_level(LevelFilter::from_str(level).unwrap());
    log::set_logger(&Logger {})
  • event controllers (destroy method)
  • use thiserror for errors instead of anyhow
  • refactor deprecated mod.rs files
  • forbid unwrap()
  • reduce amount of panics due to unwrap() where base object may be null (see the case with player_leave_vehicle event when vehicle is destroyed), print warning or error instead
  • allow base object related calls from core when destruction or creation is pending? (see the case with player_leave_vehicle event when vehicle is destroyed) 4c44399
  • other tasks from reloading #37
  • build reloading example in CI
  • (?) hide scary BaseObjectContainer<..., ...> type from users by wrapping it into tuple structs with Deref impl (for example Vehicle is BaseObjectContainer<IVehicle, WorldEntity> currently)
  • remove re-exports of anyhow, serde, etc. from altv crate
@xxshady xxshady pinned this issue Feb 11, 2025
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

No branches or pull requests

1 participant