Commit Graph

16 Commits

Author SHA1 Message Date
FabseGP
a04b7036bc chore: some cargo adjustments (#1306)
* chore: strip binaries & define rust-version in workspace

* fix: don't strip binary when profiling

* chore: clippy lints

* fix: use stable fmt

* fix: don't strip dev builds
2026-01-23 15:58:07 +01:00
Sclock
3558a4d058 feat(plugin): add API version compatibility check for native plugins (#1237) 2026-01-15 12:20:15 +01:00
Clicks
70b3132396 chore: Remove Redundant Clippy Allows (#1247)
* switch to btreemap to comply with lint

* amplifier i32 -> u8

* switch allow to expect lint

* remove many many unnecessary clippy lints

* dont use expect inside quotes
2025-12-30 12:16:31 +01:00
Clicks
24fff00425 Make All Dependencies Workspace Dependencies (#1245) 2025-12-30 12:13:51 +01:00
Bjorn Beishline
7ac20597fb Fix compilation of plugins and add examples (#1241)
* Add examples of plugins

* Fix plugin compilation

* Fix logging not working

* Remove dead code warning

* Fix all clippy lints

* Fix handle_blocking not working

* Add back .block_on

* Remove examples
2025-12-22 15:11:12 +01:00
Alexander Medvedev
70b75a0ac5 remove async-trait entirely 2025-12-04 23:50:00 +01:00
Alexander Medvedev
74c66e25e8 fix typo
and some compilation changes,
fix https://github.com/Pumpkin-MC/Pumpkin/issues/1010
2025-12-01 11:23:57 +01:00
Alexander Medvedev
b0cea38596 remove some internal crates 2025-07-11 14:23:14 +02:00
Alexander Medvedev
e96dc4d98e Improve compile time 2025-07-09 16:26:16 +02:00
Clicks
39359e35ff Improve errors from proc macros (#900)
* proc_macro_error2

* cargo fmt
2025-06-17 14:50:24 +02:00
vyPal
243258f1c4 Fix other no_mangle 2025-03-11 11:44:22 +01:00
vyPal
54b1bf1759 Add the unsafe attribute to no_mangle in plugin method generation 2025-03-11 11:01:32 +01:00
Alexander Medvedev
1fb2be46d4 Update to Rust edition 2024 2025-02-20 18:42:20 +01:00
vyPal
94dc37a275 Fix plugin macros (#553) 2025-02-15 12:02:00 +01:00
suprohub
186e846858 Plugin event rewrite (#513)
* simplify all

* fmt

* Consider using derive macro

* Add new events

* Add events call

* minor fixes

* minor fixes

* fix

* optimize code

* big changes

* fix skill issue

* fix

* Consider not specify patch version

* make logger shared

* i want test one thing

* Add one useful function

* add little amouth of docs

* use config instead

* revert changes

* fmt

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-02-01 18:14:28 +01:00
vyPal
a0ae1ae515 add Plugin system (#339)
* Add pumpkin-api crate for API definitions

* Add proc-macro definitions for pumpkin-api

* Add pumpkin-api and pumpkin-api-macros to workspace

* Add basic PluginManager implementation plugin loading

* Update .gitignore to include specific plugin file types

* Add example plugin

* Cargo fmt

* Fix clippy issues

* Refactoring to prevent a circular import

* Add base impl for plugin hooks

* Move plugin manager to server

* Make metadata have static lifetime

* Add default implementations to events

* Add hooks to proc macro

* Update example

* Fix formatting

* Fix clippy warnings

* Load metadata from Cargo.toml

* Mark plugins as an implemented feature :D

* Implement new event handling

* Create a static global reference to the plugin manager

* Emit player join and leave events

* Update macro generation

* Update example

* Fix formatting

* Fix clippy issue

* Simplify event handling

* Add plugin command to list plugins

* Make handlers async

* Update macros

* Update example

* Fix formatting and clippy issues

* Better styling on plugins command

* Fix clippy issues

* Cargo fmt

* Disable doctest for lib target on pumpkin crate

* New API for plugins

* Update api macros

* Update plugin example

* A bit of clean up

* Some QoL (and performance) improvements

* Cargo fmt and clippy fixes

* refactoring, better event handling, new context functions

* Async on_load and on_unload

* Fix mutex lock never going out of scope

* Async plugin loading

* Add plugin management command

* Fix clippy issues

* Fix import issues

* Move TcpConnection out of client

* Move packet encoding out of client

* Allow plugins to register commands

* Fix fmt and clippy

* Implement plugin list in query

* Make arguments public so that plugins can use them

* Update proc_macros to handle runtime

* Make tree_builder public for use in plugins

* Make FindArg trait public for use in plugins

* Update example plugin

* Fix merge related issues

* Fix cargo fmt

* Post-merge fixes (also 69th commit, nice)

* New event system

* cargo fmt

* Impl block break event

* cargo fmt and clippy

* Reduced plugin size

* Reduce dependency count

* Old code cleanup

* cargo fmt

* Add event priority and blocking options to event registration and handling

* Refactor event handling to support blocking execution and improve event registration

* Fix post-merge errors

* Update example plugin

* increase mpsc channel capacity and handle write errors gracefully

* Use Arc<Player> instead of &Player

* add missing import

* Update example plugin with playing sounds

* Remove example plugin

* Create plugins dir if doesnt exist

* Remove unused vars

* Remove unnecessary clones

* Fix impl

* cargo fmt

* Make server pub in context
2025-01-24 17:26:09 +01:00