altv-rust
altv-rust copied to clipboard
Rework of serverside API
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 https://github.com/xxshady/altv-rust/blob/757bc9e8e11fc7e968c7a8cca4138ac587995bbf/logger/src/lib.rs#L38-L39
- [ ] 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
- [x] 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) https://github.com/xxshady/altv-rust/commit/4c4439909abecd14943a75c04db7c7514f6179b2
- [ ] other tasks from https://github.com/xxshady/altv-rust/pull/37
- [ ] build reloading example in CI
- [ ] (?) hide scary
BaseObjectContainer<..., ...>type from users by wrapping it into tuple structs with Deref impl (for example Vehicle isBaseObjectContainer<IVehicle, WorldEntity>currently) - [ ] remove re-exports of anyhow, serde, etc. from altv crate