florob / rust-xmpp Goto Github PK
View Code? Open in Web Editor NEWSimple XMPP library in Rust
License: MIT License
Simple XMPP library in Rust
License: MIT License
I have added rust-xmpp dependency to my Cargo.toml:
[dependencies.rust-xmpp]
git = "https://github.com/Florob/rust-xmpp.git"
But when trying to compile my project with "cargo build" - get next errors:
Compiling rust-xmpp v0.0.0 (https://github.com/Florob/rust-xmpp.git#b07e499f)
Could not compile `rust-xmpp`.
--- stderr
src/xmpp/lib.rs:212:50: 212:54 error: mismatched types: expected `&openssl::ssl::SslContext`, found `&core::result::Result<openssl::ssl::SslContext,openssl::ssl::error::SslError>` (expected struct openssl::ssl::SslContext, found enum core::result::Result)
src/xmpp/lib.rs:212 let ssl = SslStream::new(&ctx, sock.unwrap());
^~~~
src/xmpp/lib.rs:213:43: 213:62 error: the trait `std::io::Reader` is not implemented for the type `core::result::Result<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>,openssl::ssl::error::SslError>`
src/xmpp/lib.rs:213 self.socket = Tls(BufferedStream::new(ssl));
^~~~~~~~~~~~~~~~~~~
src/xmpp/lib.rs:213:43: 213:62 note: the trait `std::io::Reader` must be implemented because it is required by `std::io::buffered::BufferedStream<S>::new`
src/xmpp/lib.rs:213 self.socket = Tls(BufferedStream::new(ssl));
^~~~~~~~~~~~~~~~~~~
src/xmpp/lib.rs:213:43: 213:62 error: the trait `std::io::Writer` is not implemented for the type `core::result::Result<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>,openssl::ssl::error::SslError>`
src/xmpp/lib.rs:213 self.socket = Tls(BufferedStream::new(ssl));
^~~~~~~~~~~~~~~~~~~
src/xmpp/lib.rs:213:43: 213:62 note: the trait `std::io::Writer` must be implemented because it is required by `std::io::buffered::BufferedStream<S>::new`
src/xmpp/lib.rs:213 self.socket = Tls(BufferedStream::new(ssl));
^~~~~~~~~~~~~~~~~~~
src/xmpp/lib.rs:213:43: 213:67 error: mismatched types: expected `std::io::buffered::BufferedStream<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>>`, found `std::io::buffered::BufferedStream<core::result::Result<openssl::ssl::SslStream<std::io::net::tcp::TcpStream>,openssl::ssl::error::SslError>>` (expected struct openssl::ssl::SslStream, found enum core::result::Result)
src/xmpp/lib.rs:213 self.socket = Tls(BufferedStream::new(ssl));
^~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 4 previous errors
how to fix this?
rust-xmpp binary example works great though
After:
Can you add supports of:
You can add too:
"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".
SCRAM-SHA-1(-PLUS):
-- https://tools.ietf.org/html/rfc5802
-- https://tools.ietf.org/html/rfc6120
SCRAM-SHA-256(-PLUS):
-- https://tools.ietf.org/html/rfc7677 since 2015-11-02
-- https://tools.ietf.org/html/rfc8600 since 2019-06-21: https://mailarchive.ietf.org/arch/msg/ietf-announce/suJMmeMhuAOmGn_PJYgX5Vm8lNA
SCRAM-SHA-512(-PLUS):
-- https://tools.ietf.org/html/draft-melnikov-scram-sha-512
SCRAM-SHA3-512(-PLUS):
-- https://tools.ietf.org/html/draft-melnikov-scram-sha3-512
SCRAM BIS: Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms:
-- https://tools.ietf.org/html/draft-melnikov-scram-bis
https://xmpp.org/extensions/inbox/hash-recommendations.html
-PLUS variants:
IMAP:
LDAP:
HTTP:
2FA:
IANA:
Linked to:
Hi there,
do you have any timescales for sending stanzas, getting callbacks for stanzas features?
Would be great to know if you have
Thanks!
question
Hello again
I've recently "copy/pasted" your repository and started to adapt it to create a "server side" version of the xmpp stream structure https://github.com/allan-simon/rust-xmpp-server-stream. I've done so instead of simply using your lib as a dependency because the base things I needed (xmpp socket etc.) are privates.
soon after i was thinking about simpling putting them as public but then i was wondering that maybe as one of Rust use case is embedded/low memory footprint, maybe people would prefer to either have the client lib or the server lib
so i was wondering if it would be a good idea to split this lib into smaller ones, a la node/npm where things are splitted into as small modules as possible to permit a greater reusability.
Of course the main disadvantage would be that it may complicate a little the development.
Can you post a list of features that already rust-xmpp supports?
src/xmpp/read_str.rs:34:39: 34:53 error: type `&[u8]` does not implement any method in scope named `slice_to`
src/xmpp/read_str.rs:34 (str::from_utf8(available.slice_to(last)).unwrap().to_string(), last)
Hello I've started to make a xmpp server in rust https://github.com/allan-simon/rust-xmppd and I've seen that you've started to implemented the part I've put "for latter" i.e xml parsing/tls. So I was wondering to reuse as dependency what you've done, but for that I need to know under which license your work is :)
for my part I plan to use a MIT license (I've just realized I also didn't put any...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.