mirror of
https://github.com/horizon-rust/kira-pumpkin.git
synced 2026-11-07 10:16:01 -10:00
A WebAssembly plugin for Pumpkin (pumpkin-plugin-api 0.2.1, Minecraft 26.3): a chat message starting with kira or @kira goes to Kira's endpoint (POST /game/ask, the server's token, 10 s timeouts through wasi:http) from a non-blocking async chat handler, and her answer is broadcast as "<Kira> …". Config in plugins/data/kira-pumpkin/config.toml. CI tests the logic on the host, builds the .wasm, and attaches it to a release for each v* tag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
37 lines
1.0 KiB
TOML
37 lines
1.0 KiB
TOML
[package]
|
|
name = "kira-pumpkin"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "Kira, the bot of Horizon's Discord server, answering in a Pumpkin server's chat"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/horizon-rust/kira-pumpkin"
|
|
publish = false
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = { version = "0.9", default-features = false, features = ["parse", "serde"] }
|
|
|
|
# The plugin itself: Pumpkin's WebAssembly plugin API and the WASI HTTP client underneath.
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
pumpkin-plugin-api = { version = "=0.2.1", optional = true }
|
|
wasi = "0.14"
|
|
tracing = { version = "0.1", optional = true }
|
|
|
|
[features]
|
|
default = ["plugin"]
|
|
# The Pumpkin plugin. Without it, the crate is the logic and the HTTP client alone (examples/ask.rs).
|
|
plugin = ["dep:pumpkin-plugin-api", "dep:tracing"]
|
|
|
|
[[example]]
|
|
name = "ask"
|
|
required-features = []
|
|
|
|
[profile.release]
|
|
lto = true
|
|
opt-level = "s"
|
|
strip = true
|