prosody 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.cargo/config.toml +2 -0
- data/.release-please-manifest.json +3 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/.standard.yml +9 -0
- data/.taplo.toml +6 -0
- data/ARCHITECTURE.md +591 -0
- data/CHANGELOG.md +92 -0
- data/Cargo.lock +3513 -0
- data/Cargo.toml +77 -0
- data/LICENSE +21 -0
- data/Makefile +36 -0
- data/README.md +946 -0
- data/Rakefile +26 -0
- data/ext/prosody/Cargo.toml +38 -0
- data/ext/prosody/extconf.rb +6 -0
- data/ext/prosody/src/admin.rs +171 -0
- data/ext/prosody/src/bridge/callback.rs +60 -0
- data/ext/prosody/src/bridge/mod.rs +332 -0
- data/ext/prosody/src/client/config.rs +819 -0
- data/ext/prosody/src/client/mod.rs +379 -0
- data/ext/prosody/src/gvl.rs +149 -0
- data/ext/prosody/src/handler/context.rs +436 -0
- data/ext/prosody/src/handler/message.rs +144 -0
- data/ext/prosody/src/handler/mod.rs +338 -0
- data/ext/prosody/src/handler/trigger.rs +93 -0
- data/ext/prosody/src/lib.rs +82 -0
- data/ext/prosody/src/logging.rs +353 -0
- data/ext/prosody/src/scheduler/cancellation.rs +67 -0
- data/ext/prosody/src/scheduler/handle.rs +50 -0
- data/ext/prosody/src/scheduler/mod.rs +169 -0
- data/ext/prosody/src/scheduler/processor.rs +166 -0
- data/ext/prosody/src/scheduler/result.rs +197 -0
- data/ext/prosody/src/tracing_util.rs +56 -0
- data/ext/prosody/src/util.rs +219 -0
- data/lib/prosody/configuration.rb +333 -0
- data/lib/prosody/handler.rb +177 -0
- data/lib/prosody/native_stubs.rb +417 -0
- data/lib/prosody/processor.rb +321 -0
- data/lib/prosody/sentry.rb +36 -0
- data/lib/prosody/version.rb +10 -0
- data/lib/prosody.rb +42 -0
- data/release-please-config.json +10 -0
- data/sig/configuration.rbs +252 -0
- data/sig/handler.rbs +79 -0
- data/sig/processor.rbs +100 -0
- data/sig/prosody.rbs +171 -0
- data/sig/version.rbs +9 -0
- metadata +193 -0
data/Cargo.toml
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# This Cargo.toml is here to let externals tools (IDEs, etc.) know that this is
|
|
2
|
+
# a Rust project. Your extensions dependencies should be added to the Cargo.toml
|
|
3
|
+
# in the ext/ directory.
|
|
4
|
+
|
|
5
|
+
[workspace]
|
|
6
|
+
members = ["./ext/prosody"]
|
|
7
|
+
resolver = "2"
|
|
8
|
+
|
|
9
|
+
[workspace.dependencies]
|
|
10
|
+
atomic-take = "1.1"
|
|
11
|
+
bumpalo = "3.19"
|
|
12
|
+
educe = "0.6"
|
|
13
|
+
futures = "0.3"
|
|
14
|
+
magnus = { version = "0.8", default-features = false }
|
|
15
|
+
opentelemetry = "0.31"
|
|
16
|
+
prosody = { version = "0.1", features = ["libz-static"] }
|
|
17
|
+
rb-sys = "0.9"
|
|
18
|
+
serde = "1.0"
|
|
19
|
+
serde-untagged = "0.1"
|
|
20
|
+
serde_magnus = "0.11"
|
|
21
|
+
thiserror = "2.0"
|
|
22
|
+
tikv-jemallocator = "0.6"
|
|
23
|
+
tokio = "1.46"
|
|
24
|
+
tokio-stream = "0.1"
|
|
25
|
+
tracing = "0.1"
|
|
26
|
+
tracing-opentelemetry = "0.32"
|
|
27
|
+
tracing-subscriber = "0.3"
|
|
28
|
+
|
|
29
|
+
[profile.release]
|
|
30
|
+
codegen-units = 1
|
|
31
|
+
lto = "fat"
|
|
32
|
+
|
|
33
|
+
[workspace.lints.rust]
|
|
34
|
+
missing_docs = "warn"
|
|
35
|
+
unsafe_code = "allow"
|
|
36
|
+
|
|
37
|
+
[workspace.lints.clippy]
|
|
38
|
+
blocks_in_conditions = "allow"
|
|
39
|
+
cargo = { level = "warn", priority = -1 }
|
|
40
|
+
cast_possible_truncation = "allow"
|
|
41
|
+
cast_possible_wrap = "allow"
|
|
42
|
+
cast_sign_loss = "allow"
|
|
43
|
+
create_dir = "warn"
|
|
44
|
+
dbg_macro = "warn"
|
|
45
|
+
default_numeric_fallback = "warn"
|
|
46
|
+
empty_structs_with_brackets = "warn"
|
|
47
|
+
error_impl_error = "warn"
|
|
48
|
+
exit = "warn"
|
|
49
|
+
expect_used = "deny"
|
|
50
|
+
format_push_string = "warn"
|
|
51
|
+
if_then_some_else_none = "warn"
|
|
52
|
+
impl_trait_in_params = "warn"
|
|
53
|
+
missing_assert_message = "warn"
|
|
54
|
+
module_name_repetitions = "allow"
|
|
55
|
+
multiple_inherent_impl = "warn"
|
|
56
|
+
mutex_atomic = "warn"
|
|
57
|
+
needless_raw_strings = "warn"
|
|
58
|
+
panic = "deny"
|
|
59
|
+
pedantic = { level = "warn", priority = -1 }
|
|
60
|
+
print_stderr = "warn"
|
|
61
|
+
print_stdout = "warn"
|
|
62
|
+
rc_mutex = "warn"
|
|
63
|
+
redundant_type_annotations = "warn"
|
|
64
|
+
rest_pat_in_fully_bound_structs = "warn"
|
|
65
|
+
same_name_method = "warn"
|
|
66
|
+
self_named_module_files = "warn"
|
|
67
|
+
semicolon_outside_block = "warn"
|
|
68
|
+
str_to_string = "warn"
|
|
69
|
+
string_lit_chars_any = "warn"
|
|
70
|
+
todo = "warn"
|
|
71
|
+
try_err = "warn"
|
|
72
|
+
unimplemented = "warn"
|
|
73
|
+
unnecessary_self_imports = "warn"
|
|
74
|
+
unneeded_field_pattern = "warn"
|
|
75
|
+
unreachable = "warn"
|
|
76
|
+
unwrap_used = "deny"
|
|
77
|
+
verbose_file_reads = "warn"
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Witco
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/Makefile
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Prosody Ruby Development Makefile
|
|
2
|
+
|
|
3
|
+
.PHONY: help compile compile-dev test test-tracing format format-check clean
|
|
4
|
+
|
|
5
|
+
help: ## Show this help message
|
|
6
|
+
@echo "Available commands:"
|
|
7
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
8
|
+
|
|
9
|
+
compile: ## Compile Rust extension (release mode)
|
|
10
|
+
bundle exec rake compile
|
|
11
|
+
|
|
12
|
+
compile-dev: ## Compile Rust extension (development mode)
|
|
13
|
+
bundle exec rake compile:dev
|
|
14
|
+
|
|
15
|
+
test: ## Run all tests
|
|
16
|
+
PROSODY_SUBSCRIBED_TOPICS=test-topic PROSODY_CASSANDRA_NODES=localhost:9042 bundle exec rspec --format documentation
|
|
17
|
+
|
|
18
|
+
test-tracing: compile-dev ## Run tracing integration test with OpenTelemetry collector
|
|
19
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
|
|
20
|
+
OTEL_SERVICE_NAME=prosody-ruby-tracing-test \
|
|
21
|
+
PROSODY_SUBSCRIBED_TOPICS=test-topic \
|
|
22
|
+
PROSODY_CASSANDRA_NODES=localhost:9042 \
|
|
23
|
+
bundle exec rspec --tag tracing --format documentation
|
|
24
|
+
|
|
25
|
+
format: ## Format all code (Rust + Ruby + TOML)
|
|
26
|
+
cargo +nightly fmt --manifest-path ext/prosody/Cargo.toml
|
|
27
|
+
taplo fmt
|
|
28
|
+
bundle exec standardrb --fix
|
|
29
|
+
|
|
30
|
+
format-check: ## Check formatting without modifying files (Rust + Ruby + TOML)
|
|
31
|
+
cargo +nightly fmt --manifest-path ext/prosody/Cargo.toml --check
|
|
32
|
+
taplo fmt --check
|
|
33
|
+
bundle exec standardrb
|
|
34
|
+
|
|
35
|
+
clean: ## Clean build artifacts
|
|
36
|
+
bundle exec rake clean
|