K772IAVA7N3R2TAC7SAXK4FVUOOROWMKFMUN3HX7A276H6JA6Y7QC
use iced::{
button, checkbox, container, progress_bar, radio, rule, scrollable, slider, text_input, Color,
};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Theme {
Light,
Dark,
}
impl Theme {
pub const ALL: [Theme; 2] = [Theme::Light, Theme::Dark];
const SENDER_COLORS_DARK: [Color; 8] = [
Color::from_rgb(
0x6d as f32 / 255.0,
0xdd as f32 / 255.0,
0x18 as f32 / 255.0,
),
Color::from_rgb(
0xfc as f32 / 255.0,
0xd2 as f32 / 255.0,
0x00 as f32 / 255.0,
),
Color::from_rgb(
0xcc as f32 / 255.0,
0xf9 as f32 / 255.0,
0xff as f32 / 255.0,
),
Color::from_rgb(
0x3d as f32 / 255.0,
0xdb as f32 / 255.0,
0x8c as f32 / 255.0,
),
Color::from_rgb(
0xdd as f32 / 255.0,
0x6a as f32 / 255.0,
0x35 as f32 / 255.0,
),
Color::from_rgb(
0xe2 as f32 / 255.0,
0x22 as f32 / 255.0,
0x45 as f32 / 255.0,
),
Color::from_rgb(
0x09 as f32 / 255.0,
0xe5 as f32 / 255.0,
0x38 as f32 / 255.0,
),
Color::from_rgb(
0xd1 as f32 / 255.0,
0x32 as f32 / 255.0,
0x71 as f32 / 255.0,
),
];
const SENDER_COLORS_LIGHT: [Color; 8] = [
Color::from_rgb(
0x6d as f32 / 255.0,
0xdd as f32 / 255.0,
0x18 as f32 / 255.0,
),
Color::from_rgb(
0xfc as f32 / 255.0,
0xd2 as f32 / 255.0,
0x00 as f32 / 255.0,
),
Color::from_rgb(
0xcc as f32 / 255.0,
0xf9 as f32 / 255.0,
0xff as f32 / 255.0,
),
Color::from_rgb(
0x3d as f32 / 255.0,
0xdb as f32 / 255.0,
0x8c as f32 / 255.0,
),
Color::from_rgb(
0xdd as f32 / 255.0,
0x6a as f32 / 255.0,
0x35 as f32 / 255.0,
),
Color::from_rgb(
0xe2 as f32 / 255.0,
0x22 as f32 / 255.0,
0x45 as f32 / 255.0,
),
Color::from_rgb(
0x09 as f32 / 255.0,
0xe5 as f32 / 255.0,
0x38 as f32 / 255.0,
),
Color::from_rgb(
0xd1 as f32 / 255.0,
0x32 as f32 / 255.0,
0x71 as f32 / 255.0,
),
];
pub fn calculate_sender_color(&self, name_len: usize) -> Color {
match self {
Theme::Light => Theme::SENDER_COLORS_LIGHT[name_len % Theme::SENDER_COLORS_LIGHT.len()],
Theme::Dark => Theme::SENDER_COLORS_DARK[name_len % Theme::SENDER_COLORS_DARK.len()],
}
}
}
impl Default for Theme {
fn default() -> Theme {
Theme::Dark
}
}
impl From<Theme> for Box<dyn container::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::Container.into(),
}
}
}
impl From<Theme> for Box<dyn radio::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::Radio.into(),
}
}
}
impl From<Theme> for Box<dyn text_input::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::TextInput.into(),
}
}
}
impl From<Theme> for Box<dyn button::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => light::Button.into(),
Theme::Dark => dark::Button.into(),
}
}
}
impl From<Theme> for Box<dyn scrollable::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::Scrollable.into(),
}
}
}
impl From<Theme> for Box<dyn slider::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::Slider.into(),
}
}
}
impl From<Theme> for Box<dyn progress_bar::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::ProgressBar.into(),
}
}
}
impl From<Theme> for Box<dyn checkbox::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::Checkbox.into(),
}
}
}
impl From<Theme> for Box<dyn rule::StyleSheet> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
Theme::Dark => dark::Rule.into(),
}
}
}
pub struct BrightContainer;
impl From<BrightContainer> for Box<dyn container::StyleSheet> {
fn from(_: BrightContainer) -> Self {
dark::BrightContainer.into()
}
}
pub struct RoundContainer;
impl From<RoundContainer> for Box<dyn container::StyleSheet> {
fn from(_: RoundContainer) -> Self {
dark::RoundContainer.into()
}
}
pub struct DarkTextInput;
impl From<DarkTextInput> for Box<dyn text_input::StyleSheet> {
fn from(_: DarkTextInput) -> Self {
dark::DarkTextInput.into()
}
}
pub struct DarkButton;
impl From<DarkButton> for Box<dyn button::StyleSheet> {
fn from(_: DarkButton) -> Self {
dark::DarkButton.into()
}
}
pub struct TransparentButton;
impl From<TransparentButton> for Box<dyn button::StyleSheet> {
fn from(_: TransparentButton) -> Self {
dark::TransparentButton.into()
}
}
mod light {
use iced::{button, Color, Vector};
pub struct Button;
impl button::StyleSheet for Button {
fn active(&self) -> button::Style {
button::Style {
background: Color::from_rgb(0.11, 0.42, 0.87).into(),
border_radius: 12,
shadow_offset: Vector::new(1.0, 1.0),
text_color: Color::from_rgb8(0xEE, 0xEE, 0xEE),
..button::Style::default()
}
}
fn hovered(&self) -> button::Style {
button::Style {
text_color: Color::WHITE,
shadow_offset: Vector::new(1.0, 2.0),
..self.active()
}
}
}
}
mod dark {
use iced::{
button, checkbox, container, progress_bar, radio, rule, scrollable, slider, text_input,
Color,
};
const DARK_BG: Color = Color::from_rgb(
0x36 as f32 / 255.0,
0x39 as f32 / 255.0,
0x3F as f32 / 255.0,
);
const BRIGHT_BG: Color = Color::from_rgb(
0x44 as f32 / 255.0,
0x48 as f32 / 255.0,
0x4F as f32 / 255.0,
);
const ACCENT: Color = Color::from_rgb(
0x60 as f32 / 255.0,
0x64 as f32 / 255.0,
0x6B as f32 / 255.0,
);
pub struct Container;
impl container::StyleSheet for Container {
fn style(&self) -> container::Style {
container::Style {
background: DARK_BG.into(),
text_color: Color::WHITE.into(),
..container::Style::default()
}
}
}
pub struct RoundContainer;
impl container::StyleSheet for RoundContainer {
fn style(&self) -> container::Style {
container::Style {
border_color: DARK_BG,
border_radius: 8,
border_width: 1,
..Container.style()
}
}
}
pub struct BrightContainer;
impl container::StyleSheet for BrightContainer {
fn style(&self) -> container::Style {
container::Style {
background: BRIGHT_BG.into(),
..Container.style()
}
}
}
pub struct Radio;
impl radio::StyleSheet for Radio {
fn active(&self) -> radio::Style {
radio::Style {
background: BRIGHT_BG.into(),
dot_color: ACCENT,
border_width: 1,
border_color: ACCENT,
}
}
fn hovered(&self) -> radio::Style {
radio::Style {
background: Color {
a: 0.5,
..BRIGHT_BG
}
.into(),
..self.active()
}
}
}
pub struct DarkTextInput;
impl text_input::StyleSheet for DarkTextInput {
fn active(&self) -> text_input::Style {
text_input::Style {
background: DARK_BG.into(),
..TextInput.active()
}
}
fn focused(&self) -> text_input::Style {
text_input::Style {
border_width: 3,
border_color: ACCENT,
..self.active()
}
}
fn placeholder_color(&self) -> Color {
Color::from_rgb(0.4, 0.4, 0.4)
}
fn value_color(&self) -> Color {
Color::WHITE
}
fn selection_color(&self) -> Color {
ACCENT
}
fn hovered(&self) -> text_input::Style {
text_input::Style {
border_width: 2,
border_color: Color { a: 0.5, ..ACCENT },
..self.focused()
}
}
}
pub struct TextInput;
impl text_input::StyleSheet for TextInput {
fn active(&self) -> text_input::Style {
text_input::Style {
background: BRIGHT_BG.into(),
border_radius: 8,
border_width: 0,
border_color: ACCENT,
}
}
fn focused(&self) -> text_input::Style {
text_input::Style {
border_width: 3,
border_color: ACCENT,
..self.active()
}
}
fn placeholder_color(&self) -> Color {
Color::from_rgb(0.4, 0.4, 0.4)
}
fn value_color(&self) -> Color {
Color::WHITE
}
fn selection_color(&self) -> Color {
ACCENT
}
fn hovered(&self) -> text_input::Style {
text_input::Style {
border_width: 2,
border_color: Color { a: 0.5, ..ACCENT },
..self.focused()
}
}
}
pub struct DarkButton;
impl button::StyleSheet for DarkButton {
fn active(&self) -> button::Style {
button::Style {
background: DARK_BG.into(),
border_radius: 8,
text_color: Color::WHITE,
..button::Style::default()
}
}
fn hovered(&self) -> button::Style {
button::Style {
background: ACCENT.into(),
..self.active()
}
}
fn pressed(&self) -> button::Style {
button::Style {
border_width: 1,
border_color: Color::WHITE,
..self.hovered()
}
}
fn disabled(&self) -> button::Style {
self.hovered()
}
}
pub struct TransparentButton;
impl button::StyleSheet for TransparentButton {
fn active(&self) -> button::Style {
button::Style {
background: None,
border_color: Color::TRANSPARENT,
border_radius: 0,
border_width: 0,
text_color: Color::WHITE,
..button::Style::default()
}
}
fn hovered(&self) -> button::Style {
self.active()
}
fn pressed(&self) -> button::Style {
self.active()
}
fn disabled(&self) -> button::Style {
self.active()
}
}
pub struct Button;
impl button::StyleSheet for Button {
fn active(&self) -> button::Style {
button::Style {
background: BRIGHT_BG.into(),
border_radius: 8,
text_color: Color::WHITE,
..button::Style::default()
}
}
fn hovered(&self) -> button::Style {
button::Style {
background: ACCENT.into(),
..self.active()
}
}
fn pressed(&self) -> button::Style {
button::Style {
border_width: 1,
border_color: Color::WHITE,
..self.hovered()
}
}
fn disabled(&self) -> button::Style {
self.hovered()
}
}
pub struct Scrollable;
impl scrollable::StyleSheet for Scrollable {
fn active(&self) -> scrollable::Scrollbar {
scrollable::Scrollbar {
background: Color::TRANSPARENT.into(),
border_radius: 2,
border_width: 0,
border_color: Color::TRANSPARENT,
scroller: scrollable::Scroller {
color: Color::TRANSPARENT,
border_radius: 2,
border_width: 0,
border_color: Color::TRANSPARENT,
},
}
}
fn hovered(&self) -> scrollable::Scrollbar {
let active = self.active();
scrollable::Scrollbar {
background: Color {
a: 0.5,
..BRIGHT_BG
}
.into(),
scroller: scrollable::Scroller {
color: ACCENT,
..active.scroller
},
..active
}
}
fn dragging(&self) -> scrollable::Scrollbar {
let hovered = self.hovered();
scrollable::Scrollbar {
scroller: scrollable::Scroller {
color: Color::from_rgb(0.85, 0.85, 0.85),
..hovered.scroller
},
..hovered
}
}
}
pub struct Slider;
impl slider::StyleSheet for Slider {
fn active(&self) -> slider::Style {
slider::Style {
rail_colors: (ACCENT, Color { a: 0.1, ..ACCENT }),
handle: slider::Handle {
shape: slider::HandleShape::Circle { radius: 9 },
color: ACCENT,
border_width: 0,
border_color: Color::TRANSPARENT,
},
}
}
fn hovered(&self) -> slider::Style {
let active = self.active();
slider::Style {
handle: slider::Handle {
color: ACCENT,
..active.handle
},
..active
}
}
fn dragging(&self) -> slider::Style {
let active = self.active();
slider::Style {
handle: slider::Handle {
color: Color::from_rgb(0.85, 0.85, 0.85),
..active.handle
},
..active
}
}
}
pub struct ProgressBar;
impl progress_bar::StyleSheet for ProgressBar {
fn style(&self) -> progress_bar::Style {
progress_bar::Style {
background: BRIGHT_BG.into(),
bar: ACCENT.into(),
border_radius: 10,
}
}
}
pub struct Checkbox;
impl checkbox::StyleSheet for Checkbox {
fn active(&self, is_checked: bool) -> checkbox::Style {
checkbox::Style {
background: if is_checked { ACCENT } else { BRIGHT_BG }.into(),
checkmark_color: Color::WHITE,
border_radius: 2,
border_width: 1,
border_color: ACCENT,
}
}
fn hovered(&self, is_checked: bool) -> checkbox::Style {
checkbox::Style {
background: Color {
a: 0.8,
..if is_checked { ACCENT } else { BRIGHT_BG }
}
.into(),
..self.active(is_checked)
}
}
}
pub struct Rule;
impl rule::StyleSheet for Rule {
fn style(&self) -> rule::Style {
rule::Style {
color: BRIGHT_BG,
width: 2,
radius: 1,
fill_mode: rule::FillMode::Padded(15),
}
}
}
}
pub mod login;
pub mod main;
use crate::{
client::{Client, ClientError, Session},
ui::style::Theme,
};
use iced::{executor, Application, Command, Element, Subscription};
pub use login::LoginScreen;
pub use main::MainScreen;
use std::fmt::{Display, Formatter};
/// Login information needed for a login request.
#[derive(Clone, Debug)]
pub struct LoginInformation {
homeserver_domain: String,
username: String,
password: String,
}
impl Default for LoginInformation {
fn default() -> Self {
Self {
homeserver_domain: String::from("matrix.org"),
username: String::new(),
password: String::new(),
}
}
}
#[derive(Debug)]
pub enum Message {
LoginScreen(login::Message),
MainScreen(main::Message),
/// Sent when a logout request is completed successfully.
LogoutComplete,
/// Sent whenever an error occurs.
MatrixError(Box<ClientError>),
/// Sent when the "login" is complete, ie. establishing a session and performing an initial sync.
LoginComplete(Client),
/// Do nothing.
Nothing,
}
#[derive(Debug)]
pub enum StartupFlag {
/// Use this session to login and skip the login screen.
UseSession(Session),
}
impl Display for StartupFlag {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
StartupFlag::UseSession(session) => {
write!(f, "Use this session when logging in: {}", session)
}
}
}
}
pub enum Screen {
Login { screen: LoginScreen },
Main { screen: MainScreen },
}
pub struct ScreenManager {
theme: Theme,
screen: Screen,
}
impl Default for ScreenManager {
fn default() -> Self {
Self {
theme: Theme::Dark,
screen: Screen::Login {
screen: LoginScreen::default(),
},
}
}
}
impl Application for ScreenManager {
type Executor = executor::Default;
type Message = Message;
type Flags = Option<StartupFlag>;
fn new(flags: Self::Flags) -> (Self, Command<Self::Message>) {
if let Some(flag) = flags {
match flag {
// "Login" with given session, skipping the info fields.
StartupFlag::UseSession(session) => (
Self {
screen: Screen::Login {
screen: LoginScreen::with_logging_in(Some(true)),
},
..Self::default()
},
Command::perform(async { session }, |session| {
Message::LoginScreen(login::Message::LoginWithSession(session))
}),
),
}
} else {
(Self::default(), Command::none())
}
}
fn title(&self) -> String {
String::from("Icy Matrix")
}
fn update(&mut self, msg: Self::Message) -> Command<Self::Message> {
match msg {
Message::Nothing => {}
Message::MainScreen(msg) => {
if let Screen::Main { ref mut screen } = self.screen {
return screen.update(msg);
}
}
Message::LoginScreen(msg) => {
if let Screen::Login { ref mut screen } = self.screen {
return screen.update(msg);
}
}
Message::LoginComplete(client) => {
self.screen = Screen::Main {
screen: MainScreen::new(client),
};
}
Message::LogoutComplete => {
self.screen = Screen::Login {
screen: LoginScreen::default(),
};
}
Message::MatrixError(err) => {
use ruma::{api::client::error::ErrorKind as ClientAPIErrorKind, api::error::*};
use ruma_client::Error as InnerClientError;
let error_string = err.to_string();
log::error!("{}", error_string);
if let ClientError::Internal(err) = *err {
if let InnerClientError::FromHttpResponse(err) = err {
if let FromHttpResponseError::Http(err) = err {
if let ServerError::Known(err) = err {
// Return to login screen since the users session has expired.
if let ClientAPIErrorKind::UnknownToken { soft_logout: _ } =
err.kind
{
self.screen = Screen::Login {
screen: LoginScreen::with_error(error_string),
};
return Command::none();
}
}
}
}
}
if let Screen::Login { ref mut screen } = self.screen {
screen.on_error(error_string.clone());
}
if let Screen::Main { ref mut screen } = self.screen {
screen.on_error(error_string);
}
}
}
Command::none()
}
fn subscription(&self) -> Subscription<Self::Message> {
if let Screen::Main { ref screen, .. } = self.screen {
screen.subscription()
} else {
Subscription::none()
}
}
fn view(&mut self) -> Element<Self::Message> {
match self.screen {
Screen::Login { ref mut screen } => screen.view(self.theme).map(Message::LoginScreen),
Screen::Main { ref mut screen } => screen.view(self.theme).map(Message::MainScreen),
}
}
}
use crate::{
client::{
media::ThumbnailStore,
media::{make_content_folder, make_content_path, ImageHandle},
Client, ClientError, TimelineEvent,
},
ui::{
component::{build_event_history, build_room_list, event_history::SHOWN_MSGS_LIMIT},
style::{BrightContainer, DarkButton, DarkTextInput, Theme},
},
};
use iced::{
button, scrollable, text_input, Align, Button, Color, Column, Command, Container, Element,
Length, Row, Space, Subscription, Text, TextInput,
};
use iced_futures::BoxStream;
use ruma::{
api::{
client::r0::{context::get_context, message::send_message_event, sync::sync_events},
exports::http::Uri,
},
events::{room::message::MessageEventContent, AnyMessageEventContent},
presence::PresenceState,
EventId, RoomId,
};
use std::{collections::HashMap, hash::Hash, hash::Hasher, time::Duration};
use uuid::Uuid;
#[derive(Debug, Clone)]
pub enum Message {
/// Sent when the user wants to send a message.
SendMessage,
SendFile,
/// Sent when user makes a change to the message they are composing.
MessageChanged(String),
ScrollToBottom,
OpenContent(Uri, bool),
DownloadedThumbnail {
thumbnail_url: Uri,
thumbnail: ImageHandle,
},
/// Sent when the user selects a different room.
RoomChanged(RoomId),
/// Sent when the user scrolls the message history.
MessageHistoryScrolled(f32),
/// Sent when the user clicks the logout button.
LogoutInitiated,
LogoutConfirmation(bool),
/// Sent when a `main::Message::SendMessage` message returns a `LimitExceeded` error.
/// This is used to retry sending a message. The duration is
/// the "retry after" time. The UUID is the transaction ID of
/// this message, used to identify which message to re-send.
/// The room ID is the ID of the room in which the message is
/// stored.
RetrySendMessage {
retry_after: Duration,
transaction_id: Uuid,
room_id: RoomId,
},
/// Sent when a sync response is received from the server.
MatrixSyncResponse(Box<sync_events::Response>),
/// Sent when a "get context" (get events around an event) is received from the server.
MatrixGetEventsAroundResponse(Box<get_context::Response>),
}
pub struct MainScreen {
composer_state: text_input::State,
scroll_to_bottom_but_state: button::State,
send_file_but_state: button::State,
event_history_state: scrollable::State,
rooms_list_state: scrollable::State,
rooms_buts_state: Vec<button::State>,
content_open_buts_state: Vec<button::State>,
logout_but_state: button::State,
logout_approve_but_state: button::State,
logout_cancel_but_state: button::State,
/// `Some(confirmation)` if there is an ongoing logout request, `None` otherwise.
/// `confirmation` is `true` if the user approves the logout, `false` otherwise.
logging_out: Option<bool>,
/// `None` if the user didn't select a room, `Some(room_id)` otherwise.
current_room_id: Option<RoomId>,
looking_at_event: HashMap<RoomId, usize>,
/// The previous scrolled percentage of the message history list.
/// Used to check if it's fine to request older / newer events from the server.
prev_scroll_perc: f32,
// TODO: move client to `ScreenManager` as an `Option` so we can keep the client between screens
client: Client,
/// The message the user is currently typing.
message: String,
thumbnail_store: ThumbnailStore,
}
impl MainScreen {
pub fn new(client: Client) -> Self {
Self {
client,
composer_state: Default::default(),
scroll_to_bottom_but_state: Default::default(),
send_file_but_state: Default::default(),
event_history_state: Default::default(),
rooms_list_state: Default::default(),
rooms_buts_state: Default::default(),
content_open_buts_state: vec![Default::default(); SHOWN_MSGS_LIMIT],
logout_but_state: Default::default(),
logout_approve_but_state: Default::default(),
logout_cancel_but_state: Default::default(),
logging_out: None,
current_room_id: None,
looking_at_event: Default::default(),
prev_scroll_perc: 0.0,
message: Default::default(),
thumbnail_store: ThumbnailStore::new(),
}
}
pub fn view(&mut self, theme: Theme) -> Element<Message> {
if let Some(confirmation) = self.logging_out {
return if confirmation {
Container::new(Text::new("Logging out...").size(30))
.center_y()
.center_x()
.width(Length::Fill)
.height(Length::Fill)
.style(theme)
.into()
} else {
let logout_confirm_panel = Column::with_children(
vec![
Text::new("Do you want to logout?").into(),
Text::new("This will delete your current session and you will need to login with your password.")
.color(Color::from_rgb(1.0, 0.0, 0.0))
.into(),
Row::with_children(
vec![
Space::with_width(Length::FillPortion(2)).into(),
Button::new(&mut self.logout_approve_but_state, Container::new(Text::new("Yes")).width(Length::Fill).center_x())
.width(Length::FillPortion(1))
.on_press(Message::LogoutConfirmation(true))
.style(theme)
.into(),
Space::with_width(Length::FillPortion(1)).into(),
Button::new(&mut self.logout_cancel_but_state, Container::new(Text::new("No")).width(Length::Fill).center_x())
.width(Length::FillPortion(1))
.on_press(Message::LogoutConfirmation(false))
.style(theme)
.into(),
Space::with_width(Length::FillPortion(2)).into(),
])
.width(Length::Fill)
.align_items(Align::Center)
.into(),
])
.align_items(Align::Center)
.spacing(12);
let padded_panel = Row::with_children(vec![
Space::with_width(Length::FillPortion(3)).into(),
logout_confirm_panel.width(Length::FillPortion(4)).into(),
Space::with_width(Length::FillPortion(3)).into(),
])
.height(Length::Fill)
.align_items(Align::Center);
Container::new(padded_panel)
.width(Length::Fill)
.height(Length::Fill)
.style(theme)
.into()
};
}
for (room_id, index) in self.looking_at_event.drain().collect::<Vec<_>>() {
if self
.client
.rooms()
.keys()
.any(|other_room_id| other_room_id == &room_id)
{
self.looking_at_event.insert(room_id, index);
}
}
for (room_id, room) in self.client.rooms() {
if !self.looking_at_event.keys().any(|id| id == room_id) {
self.looking_at_event.insert(
room_id.clone(),
room.displayable_events().len().saturating_sub(1),
);
}
}
let rooms = self.client.rooms();
if rooms.len() != self.rooms_buts_state.len() {
self.rooms_buts_state = vec![Default::default(); rooms.len()];
}
let room_list = build_room_list(
rooms,
self.current_room_id.as_ref(),
&mut self.rooms_list_state,
self.rooms_buts_state.as_mut_slice(),
Message::RoomChanged,
theme,
);
let logout = Button::new(&mut self.logout_but_state, Text::new("Logout").size(16))
.width(Length::Fill)
.on_press(Message::LogoutInitiated)
.style(DarkButton);
let user_name = Text::new(self.client.current_user_id().localpart())
.size(16)
.width(Length::Fill);
let user_area =
Row::with_children(vec![logout.into(), user_name.into()]).align_items(Align::Center);
let rooms_area =
Column::with_children(vec![room_list, user_area.width(Length::Fill).into()]);
let mut screen_widgets = vec![Container::new(rooms_area)
.width(Length::Units(250))
.height(Length::Fill)
.style(theme)
.into()];
if let Some(room_id) = self.current_room_id.as_ref() {
if let Some(room) = rooms.get(room_id) {
let message_composer = TextInput::new(
&mut self.composer_state,
"Enter your message here...",
self.message.as_str(),
Message::MessageChanged,
)
.padding(12)
.size(16)
.style(DarkTextInput)
.on_submit(Message::SendMessage);
let current_user_id = self.client.current_user_id();
let room_disp_len = room.displayable_events().len();
let message_history_list = build_event_history(
&self.thumbnail_store,
room,
¤t_user_id,
self.looking_at_event
.get(room_id)
.copied()
.unwrap_or_else(|| room_disp_len.saturating_sub(1)),
&mut self.event_history_state,
&mut self.content_open_buts_state,
theme,
);
let mut typing_users_combined = String::new();
let mut typing_members = room.typing_members();
// Remove own user id from the list (if its there)
if let Some(index) = typing_members.iter().position(|id| *id == ¤t_user_id) {
typing_members.remove(index);
}
let typing_members_count = typing_members.len();
for (index, member_id) in typing_members.iter().enumerate() {
if index > 2 {
typing_users_combined += " and others are typing...";
break;
}
typing_users_combined += room.get_user_display_name(member_id).as_str();
typing_users_combined += match typing_members_count {
x if x > index + 1 => ", ",
1 => " is typing...",
_ => " are typing...",
};
}
let typing_users = Column::with_children(vec![
Space::with_width(Length::Units(6)).into(),
Row::with_children(vec![
Space::with_width(Length::Units(9)).into(),
Text::new(typing_users_combined).size(14).into(),
])
.into(),
]);
let send_file_button =
Button::new(&mut self.send_file_but_state, Text::new("↑").size(28))
.style(DarkButton)
.on_press(Message::SendFile);
let mut bottom_area_widgets = vec![
send_file_button.into(),
message_composer.width(Length::Fill).into(),
];
// This unwrap is safe since we add the room to the map before this
if *self.looking_at_event.get(room_id).unwrap()
< room_disp_len.saturating_sub(SHOWN_MSGS_LIMIT)
{
bottom_area_widgets.push(
Button::new(
&mut self.scroll_to_bottom_but_state,
Text::new("↡").size(28),
)
.style(DarkButton)
.on_press(Message::ScrollToBottom)
.into(),
);
}
let message_area = Column::with_children(vec![
message_history_list,
typing_users.into(),
Container::new(
Row::with_children(bottom_area_widgets)
.spacing(8)
.width(Length::Fill),
)
.width(Length::Fill)
.padding(8)
.into(),
]);
screen_widgets.push(
Container::new(message_area)
.width(Length::Fill)
.height(Length::Fill)
.style(BrightContainer)
.into(),
);
}
}
// We know that there will be only one widget if the user isn't looking at a room currently
if screen_widgets.len() < 2 {
let in_no_room_warning = Container::new(
Text::new("Select / join a room to start chatting!")
.size(35)
.color(Color::from_rgb(0.5, 0.5, 0.5)),
)
.center_x()
.center_y()
.style(BrightContainer);
screen_widgets.push(
in_no_room_warning
.width(Length::Fill)
.height(Length::Fill)
.into(),
);
}
Row::with_children(screen_widgets)
.height(Length::Fill)
.width(Length::Fill)
.into()
}
pub fn update(&mut self, msg: Message) -> Command<super::Message> {
fn process_send_message_result(
result: Result<send_message_event::Response, ClientError>,
transaction_id: Uuid,
room_id: RoomId,
) -> super::Message {
use ruma::{api::client::error::ErrorKind as ClientAPIErrorKind, api::error::*};
use ruma_client::Error as InnerClientError;
match result {
Ok(_) => super::Message::Nothing,
Err(err) => {
if let ClientError::Internal(InnerClientError::FromHttpResponse(
FromHttpResponseError::Http(ServerError::Known(err)),
)) = &err
{
if let ClientAPIErrorKind::LimitExceeded {
retry_after_ms: Some(retry_after),
} = err.kind
{
return super::Message::MainScreen(Message::RetrySendMessage {
retry_after,
transaction_id,
room_id,
});
}
}
super::Message::MatrixError(Box::new(err))
}
}
}
fn make_get_events_around_command(
inner: ruma_client::Client,
room_id: RoomId,
event_id: EventId,
) -> Command<super::Message> {
Command::perform(
Client::get_events_around(inner, room_id, event_id),
|result| match result {
Ok(response) => super::Message::MainScreen(
Message::MatrixGetEventsAroundResponse(Box::new(response)),
),
Err(err) => super::Message::MatrixError(Box::new(err)),
},
)
}
fn make_download_content_com(
inner: ruma_client::Client,
content_url: Uri,
) -> Command<super::Message> {
Command::perform(
async move {
let download_result =
Client::download_content(inner, content_url.clone()).await;
match download_result {
Ok(raw_data) => {
let path = make_content_path(&content_url);
let server_media_dir = make_content_folder(&content_url);
tokio::fs::create_dir_all(server_media_dir).await?;
tokio::fs::write(path, raw_data.as_slice())
.await
.map(|_| (content_url, raw_data))
.map_err(|e| e.into())
}
Err(err) => Err(err),
}
},
|result| match result {
Ok((content_url, raw_data)) => {
super::Message::MainScreen(Message::DownloadedThumbnail {
thumbnail_url: content_url,
thumbnail: ImageHandle::from_memory(raw_data),
})
}
Err(err) => super::Message::MatrixError(Box::new(err)),
},
)
}
fn make_read_thumbnail_com(thumbnail_url: Uri) -> Command<super::Message> {
Command::perform(
async move {
(
async {
Ok(ImageHandle::from_memory(
tokio::fs::read(make_content_path(&thumbnail_url)).await?,
))
}
.await,
thumbnail_url,
)
},
|(result, thumbnail_url)| match result {
Ok(thumbnail) => super::Message::MainScreen(Message::DownloadedThumbnail {
thumbnail,
thumbnail_url,
}),
Err(err) => super::Message::MatrixError(Box::new(err)),
},
)
}
fn scroll_to_bottom(screen: &mut MainScreen, room_id: RoomId) {
if let Some(disp) = screen
.client
.get_room(&room_id)
.map(|room| room.displayable_events().len())
{
screen
.looking_at_event
.entry(room_id)
.and_modify(|d| *d = disp.saturating_sub(1))
.or_insert_with(|| disp.saturating_sub(1));
}
}
match msg {
Message::MessageHistoryScrolled(scroll_perc) => {
if scroll_perc < 0.01 && scroll_perc <= self.prev_scroll_perc {
if let Some((Some(disp), Some(looking_at_event))) =
self.current_room_id.clone().map(|id| {
(
self.client
.get_room(&id)
.map(|room| room.displayable_events().len()),
self.looking_at_event.get_mut(&id),
)
})
{
if *looking_at_event == disp.saturating_sub(1) {
*looking_at_event = disp.saturating_sub(SHOWN_MSGS_LIMIT + 1);
} else {
*looking_at_event = looking_at_event.saturating_sub(1);
}
if *looking_at_event < 2 {
if let Some(Some((Some(event), room_id))) =
self.current_room_id.as_ref().map(|id| {
self.client
.get_room(id)
.map(|room| (room.oldest_event(), id))
})
{
let inner = self.client.inner();
let room_id = room_id.clone();
let event_id = event.id().clone();
self.prev_scroll_perc = scroll_perc;
return make_get_events_around_command(inner, room_id, event_id);
}
}
}
} else if scroll_perc > 0.99 && scroll_perc >= self.prev_scroll_perc {
if let Some((Some(disp), Some(looking_at_event))) =
self.current_room_id.clone().map(|id| {
(
self.client
.get_room(&id)
.map(|room| room.displayable_events().len()),
self.looking_at_event.get_mut(&id),
)
})
{
if *looking_at_event > disp.saturating_sub(SHOWN_MSGS_LIMIT) {
*looking_at_event = disp.saturating_sub(1);
} else {
*looking_at_event = looking_at_event.saturating_add(1).min(disp);
}
}
}
self.prev_scroll_perc = scroll_perc;
}
Message::LogoutInitiated => {
self.logging_out = Some(false);
}
Message::LogoutConfirmation(confirmation) => {
if confirmation {
self.logging_out = Some(true);
let inner = self.client.inner();
return Command::perform(Client::logout(inner), |result| match result {
Ok(_) => super::Message::LogoutComplete,
Err(err) => super::Message::MatrixError(Box::new(err)),
});
} else {
self.logging_out = None;
}
}
Message::MessageChanged(new_msg) => {
self.message = new_msg;
if let Some(room_id) = self.current_room_id.as_ref() {
let inner = self.client.inner();
return Command::perform(
Client::send_typing(inner, room_id.clone(), self.client.current_user_id()),
|result| match result {
Ok(_) => super::Message::Nothing,
Err(err) => super::Message::MatrixError(Box::new(err)),
},
);
}
}
Message::ScrollToBottom => {
if let Some(room_id) = self.current_room_id.clone() {
scroll_to_bottom(self, room_id);
self.prev_scroll_perc = 1.0;
self.event_history_state.scroll_to_bottom();
}
}
Message::DownloadedThumbnail {
thumbnail_url,
thumbnail,
} => {
self.thumbnail_store.put_thumbnail(thumbnail_url, thumbnail);
}
Message::OpenContent(content_url, is_thumbnail) => {
let process_path_result = |result| match result {
Ok(path) => {
open::that_in_background(path);
super::Message::Nothing
}
Err(err) => super::Message::MatrixError(Box::new(err)),
};
let path = make_content_path(&content_url);
return if path.exists() {
Command::perform(async move { Ok(path) }, process_path_result)
} else {
let inner = self.client.inner();
Command::perform(
async move {
let download_result =
Client::download_content(inner, content_url.clone()).await;
match download_result {
Ok(raw_data) => {
let path = make_content_path(&content_url);
let server_media_dir = make_content_folder(&content_url);
tokio::fs::create_dir_all(server_media_dir).await?;
tokio::fs::write(&path, raw_data.as_slice()).await?;
Ok(if is_thumbnail {
Some((path, content_url, raw_data))
} else {
None
})
}
Err(err) => Err(err),
}
},
|result| match result {
Ok(data) => {
if let Some((path, content_url, raw_data)) = data {
open::that_in_background(path);
super::Message::MainScreen(Message::DownloadedThumbnail {
thumbnail_url: content_url,
thumbnail: ImageHandle::from_memory(raw_data),
})
} else {
super::Message::Nothing
}
}
Err(err) => super::Message::MatrixError(Box::new(err)),
},
)
};
}
Message::SendFile => {}
Message::SendMessage => {
if !self.message.is_empty() {
let content =
MessageEventContent::text_plain(self.message.drain(..).collect::<String>());
if let Some((inner, room_id)) = self
.current_room_id
.clone()
.map(|id| (self.client.inner(), id))
{
scroll_to_bottom(self, room_id.clone());
self.prev_scroll_perc = 1.0;
self.event_history_state.scroll_to_bottom();
let transaction_id = Uuid::new_v4();
// HACK: This unwrap *should* be safe
self.client.get_room_mut(&room_id).unwrap().add_event(
TimelineEvent::new_unacked_message(content.clone(), transaction_id),
);
let content = AnyMessageEventContent::RoomMessage(content);
return Command::perform(
async move {
(
Client::send_message(
inner,
content,
room_id.clone(),
transaction_id,
)
.await,
transaction_id,
room_id,
)
},
|(result, transaction_id, room_id)| {
process_send_message_result(result, transaction_id, room_id)
},
);
}
}
}
Message::RetrySendMessage {
retry_after,
transaction_id,
room_id,
} => {
let inner = self.client.inner();
let content = if let Some(Some(Some(content))) =
self.client.get_room(&room_id).map(|room| {
room.timeline()
.iter()
.find(|tevent| tevent.transaction_id() == Some(&transaction_id))
.map(|tevent| tevent.message_content())
}) {
content
} else {
return Command::none();
};
return Command::perform(
async move {
tokio::time::delay_for(retry_after).await;
(
Client::send_message(inner, content, room_id.clone(), transaction_id)
.await,
transaction_id,
room_id,
)
},
|(result, transaction_id, room_id)| {
process_send_message_result(result, transaction_id, room_id)
},
);
}
Message::MatrixSyncResponse(response) => {
let (download_urls, read_urls) = self.client.process_sync_response(*response);
for (room_id, disp) in self
.client
.rooms()
.iter()
.map(|(id, room)| (id, room.displayable_events().len()))
.filter(|(id, disp)| {
self.current_room_id.as_ref() != Some(id)
&& if let Some(disp_at) = self.looking_at_event.get(id) {
*disp_at == disp.saturating_sub(1)
} else {
false
}
})
.map(|(id, disp)| (id.clone(), disp))
.collect::<Vec<(RoomId, usize)>>()
{
*self.looking_at_event.get_mut(&room_id).unwrap() = disp.saturating_sub(1);
}
return Command::batch(
download_urls
.into_iter()
.map(|url| make_download_content_com(self.client.inner(), url))
.chain(
read_urls
.into_iter()
.map(|url| make_read_thumbnail_com(url)),
),
);
}
Message::MatrixGetEventsAroundResponse(response) => {
let (download_urls, read_urls) =
self.client.process_events_around_response(*response);
return Command::batch(
download_urls
.into_iter()
.map(|url| make_download_content_com(self.client.inner(), url))
.chain(
read_urls
.into_iter()
.map(|url| make_read_thumbnail_com(url)),
),
);
}
Message::RoomChanged(new_room_id) => {
if let (Some(disp), Some(disp_at)) = (
self.client
.get_room(&new_room_id)
.map(|room| room.displayable_events().len()),
self.looking_at_event.get_mut(&new_room_id),
) {
if *disp_at >= disp.saturating_sub(SHOWN_MSGS_LIMIT) {
*disp_at = disp.saturating_sub(1);
self.prev_scroll_perc = 1.0;
self.event_history_state.scroll_to_bottom();
}
}
self.current_room_id = Some(new_room_id);
}
}
Command::none()
}
pub fn subscription(&self) -> Subscription<super::Message> {
if let Some(since) = self.client.next_batch() {
Subscription::from_recipe(SyncRecipe {
client: self.client.inner(),
since,
})
.map(|result| match result {
Ok(response) => {
super::Message::MainScreen(Message::MatrixSyncResponse(Box::from(response)))
}
Err(err) => super::Message::MatrixError(Box::new(err)),
})
} else {
Subscription::none()
}
}
pub fn on_error(&mut self, _error_string: String) {
self.logging_out = None;
}
}
pub type SyncResult = Result<sync_events::Response, ClientError>;
pub struct SyncRecipe {
client: crate::client::InnerClient,
since: String,
}
impl<H, I> iced_futures::subscription::Recipe<H, I> for SyncRecipe
where
H: Hasher,
{
type Output = SyncResult;
fn hash(&self, state: &mut H) {
std::any::TypeId::of::<Self>().hash(state);
self.since.hash(state);
self.client.session().hash(state);
}
fn stream(self: Box<Self>, _input: BoxStream<I>) -> BoxStream<Self::Output> {
use iced_futures::futures::TryStreamExt;
Box::pin(
self.client
.sync(
None,
self.since,
&PresenceState::Online,
Some(Duration::from_secs(20)),
)
.map_err(ClientError::Internal),
)
}
}
use super::LoginInformation;
use crate::{
client::{Client, ClientError, Session},
ui::style::Theme,
};
use iced::{
button, text_input, Align, Button, Color, Column, Command, Container, Element, Length, Row,
Space, Subscription, Text, TextInput,
};
#[derive(Debug, Clone)]
pub enum Message {
HomeserverChanged(String),
UsernameChanged(String),
PasswordChanged(String),
LoginWithSession(Session),
LoginInitiated,
}
#[derive(Default)]
pub struct LoginScreen {
homeserver_field: text_input::State,
username_field: text_input::State,
password_field: text_input::State,
login_button: button::State,
login_info: LoginInformation,
/// `None` if not logging out, `Some(restoring_session)` if logging in.
logging_in: Option<bool>,
/// The error formatted as a string to be displayed to the user.
current_error: String,
}
impl LoginScreen {
pub fn with_logging_in(logging_in: Option<bool>) -> Self {
Self {
logging_in,
..Self::default()
}
}
pub fn with_error(current_error: String) -> Self {
Self {
current_error,
..Self::default()
}
}
pub fn view(&mut self, theme: Theme) -> Element<Message> {
if let Some(restoring_session) = self.logging_in {
return Container::new(
Text::new(if restoring_session {
"Restoring session..."
} else {
"Logging in..."
})
.size(30),
)
.center_x()
.center_y()
.width(Length::Fill)
.height(Length::Fill)
.style(theme)
.into();
}
let error_text = Text::new(&self.current_error)
.color(Color::from_rgb8(200, 0, 0))
.size(18);
let homeserver_prefix = Text::new("https://");
let homeserver_field = TextInput::new(
&mut self.homeserver_field,
"Enter your homeserver domain here...",
&self.login_info.homeserver_domain,
Message::HomeserverChanged,
)
.padding(8)
.style(theme);
let homeserver_area = Row::with_children(vec![
Container::new(homeserver_prefix).padding(8).into(),
homeserver_field.into(),
])
.align_items(Align::Start);
let username_field = TextInput::new(
&mut self.username_field,
"Enter your username here...",
&self.login_info.username,
Message::UsernameChanged,
)
.padding(8)
.style(theme);
let password_field = TextInput::new(
&mut self.password_field,
"Enter your password here...",
&self.login_info.password,
Message::PasswordChanged,
)
.padding(8)
.style(theme)
.on_submit(Message::LoginInitiated)
.password();
let login_button = Button::new(&mut self.login_button, Text::new("Login"))
.on_press(Message::LoginInitiated)
.style(theme);
let login_panel = Column::with_children(vec![
error_text.into(),
homeserver_area.into(),
username_field.into(),
password_field.into(),
login_button.into(),
])
.align_items(Align::Center)
.spacing(12);
let padded_panel = Row::with_children(vec![
Space::with_width(Length::FillPortion(3)).into(),
login_panel.width(Length::FillPortion(4)).into(),
Space::with_width(Length::FillPortion(3)).into(),
])
.height(Length::Fill)
.align_items(Align::Center);
Container::new(padded_panel)
.style(theme)
.width(Length::Fill)
.height(Length::Fill)
.into()
}
pub fn update(&mut self, msg: Message) -> Command<super::Message> {
match msg {
Message::HomeserverChanged(new_homeserver) => {
self.login_info.homeserver_domain = new_homeserver;
}
Message::UsernameChanged(new_username) => {
self.login_info.username = new_username;
}
Message::PasswordChanged(new_password) => {
self.login_info.password = new_password;
}
Message::LoginWithSession(session) => {
async fn try_login(session: Session) -> Result<Client, ClientError> {
let mut client = Client::new_with_session(session)?;
client.initial_sync().await?;
Ok(client)
}
return Command::perform(try_login(session), |result| match result {
Ok(client) => super::Message::LoginComplete(client),
Err(err) => super::Message::MatrixError(Box::new(err)),
});
}
Message::LoginInitiated => {
async fn try_login(login_info: LoginInformation) -> Result<Client, ClientError> {
let mut client = Client::new(
&format!("https://{}", login_info.homeserver_domain),
&login_info.username,
&login_info.password,
)
.await?;
client.initial_sync().await?;
Ok(client)
}
self.logging_in = Some(false);
return Command::perform(
try_login(self.login_info.clone()),
|result| match result {
Ok(client) => super::Message::LoginComplete(client),
Err(err) => super::Message::MatrixError(Box::new(err)),
},
);
}
}
Command::none()
}
pub fn subscription(&self) -> Subscription<super::Message> {
Subscription::none()
}
pub fn on_error(&mut self, error_string: String) {
self.current_error = error_string;
self.logging_in = None;
}
}
pub mod component;
pub mod screen;
pub mod style;
use crate::{
client::{Room, Rooms},
ui::style::{DarkButton, Theme},
};
use iced::{button, scrollable, Align, Button, Element, Length, Scrollable, Text};
use ruma::RoomId;
/// Builds a room list.
pub fn build_room_list<'a, Message: Clone + 'a>(
rooms: &Rooms,
current_room_id: Option<&RoomId>,
state: &'a mut scrollable::State,
buttons_state: &'a mut [button::State],
on_button_press: fn(RoomId) -> Message,
theme: Theme,
) -> Element<'a, Message> {
let mut rooms = rooms.iter().collect::<Vec<(&RoomId, &Room)>>();
rooms.sort_unstable_by(|(_, room), (_, other_room)| {
room.get_display_name().cmp(&other_room.get_display_name())
});
let mut room_list = Scrollable::new(state)
.style(theme)
.align_items(Align::Start)
.height(Length::Fill)
.spacing(8)
.padding(4);
for ((room_id, room), button_state) in rooms.into_iter().zip(buttons_state.iter_mut()) {
let mut but = Button::new(button_state, Text::new(room.get_display_name()))
.width(Length::Fill)
.style(DarkButton);
let mut is_current_room = false;
if let Some(id) = current_room_id {
if room_id == id {
is_current_room = true;
}
}
if !is_current_room {
but = but.on_press(on_button_press(room_id.clone()));
}
room_list = room_list.push(but);
}
room_list.into()
}
pub mod event_history;
pub mod room_list;
pub use event_history::build_event_history;
pub use room_list::build_room_list;
use crate::{
client::{
media::ContentType,
media::{make_content_path, ThumbnailStore},
Room,
},
ui::{
screen::main::Message,
style::{DarkButton, Theme},
},
};
use chrono::{DateTime, Datelike, Local};
use iced::{
button, scrollable, Align, Button, Color, Column, Container, Element, Image, Length, Row,
Scrollable, Space, Text,
};
use ruma::{api::exports::http::Uri, UserId};
use std::time::Duration;
pub const SHOWN_MSGS_LIMIT: usize = 32; // for only one half
#[allow(clippy::mutable_key_type)]
pub fn build_event_history<'a>(
thumbnail_store: &ThumbnailStore,
room: &Room,
current_user_id: &UserId,
looking_at_event: usize,
scrollable_state: &'a mut scrollable::State,
content_open_buttons: &'a mut Vec<button::State>,
theme: Theme,
) -> Element<'a, Message> {
let mut event_history = Scrollable::new(scrollable_state)
.on_scroll(Message::MessageHistoryScrolled)
.width(Length::Fill)
.height(Length::Fill)
.style(theme)
.align_items(Align::Start)
.spacing(8)
.padding(16);
let timeline_range_end = looking_at_event
.saturating_add(SHOWN_MSGS_LIMIT)
.min(room.displayable_events().len());
let timeline_range_start = timeline_range_end.saturating_sub(SHOWN_MSGS_LIMIT);
let displayable_events = &room.displayable_events()[timeline_range_start..timeline_range_end];
let mut last_timestamp = if let Some(ev) = displayable_events.first() {
*ev.origin_server_timestamp()
} else {
return event_history.into();
};
let mut last_sender = None;
// This unwrap should be safe enough
let mut last_minute = last_timestamp.elapsed().unwrap().as_secs() / 60;
let mut message_group = vec![];
for (timeline_event, media_open_button_state) in displayable_events
.iter()
.zip(content_open_buttons.iter_mut())
{
let cur_timestamp = timeline_event.origin_server_timestamp().elapsed().unwrap();
let id_to_use = if !timeline_event.is_ack() {
current_user_id
} else {
timeline_event.sender()
};
let sender_display_name = room.get_user_display_name(id_to_use);
let sender_body_creator = |sender_display_name: &str| {
Text::new(format!("[{}]", sender_display_name))
.color(theme.calculate_sender_color(id_to_use.localpart().len()))
.size(19)
};
let mut is_sender_different = false;
if last_sender != Some(id_to_use) {
is_sender_different = true;
if !message_group.is_empty() {
event_history = event_history.push(
Container::new(
Column::with_children(message_group.drain(..).collect())
.align_items(Align::Start)
.padding(16)
.spacing(4),
)
.style(crate::ui::style::RoundContainer),
);
}
message_group.push(sender_body_creator(&sender_display_name).into());
}
if !is_sender_different {
// These unwraps should be safe enough
let time = last_timestamp.elapsed().unwrap();
if !message_group.is_empty()
&& time.checked_sub(cur_timestamp).unwrap_or_default() > Duration::from_secs(60 * 5)
{
event_history = event_history.push(
Container::new(
Column::with_children(message_group.drain(..).collect())
.align_items(Align::Start)
.padding(16)
.spacing(4),
)
.style(crate::ui::style::RoundContainer),
);
let cur_time_date =
DateTime::<Local>::from(*timeline_event.origin_server_timestamp());
let time_date = DateTime::<Local>::from(last_timestamp);
if cur_time_date.day() != time_date.day() {
let date_time_seperator = Container::new(
Text::new(cur_time_date.format("[%d %B %Y]").to_string())
.size(22)
.color(Color::from_rgb(0.6, 0.6, 0.6)),
)
.center_x()
.center_y()
.height(Length::Shrink)
.width(Length::Fill);
event_history = event_history.push(date_time_seperator);
}
message_group.push(sender_body_creator(&sender_display_name).into());
}
}
let mut message_text = Text::new(timeline_event.formatted(room)).size(16);
if !timeline_event.is_ack() {
message_text = message_text.color(Color::from_rgb(0.5, 0.5, 0.5));
} else if timeline_event.is_state() {
message_text = message_text.color(Color::from_rgb8(200, 200, 200));
} else if timeline_event.is_redacted_message() {
message_text = message_text.color(Color::from_rgb8(200, 0, 0));
}
let mut message_body_widgets = vec![message_text.into()];
if let (Some(content_url), Some(content_type)) =
(timeline_event.content_url(), timeline_event.content_type())
{
fn create_button<'a>(
is_thumbnail: bool,
content_url: Uri,
content: impl Into<Element<'a, Message>>,
button_state: &'a mut button::State,
) -> Element<'a, Message> {
Button::new(button_state, content.into())
.on_press(Message::OpenContent(content_url, is_thumbnail))
.style(DarkButton)
.into()
};
let is_thumbnail = matches!(content_type, ContentType::Image);
let does_content_exist = make_content_path(&content_url).exists();
if let Some(thumbnail_image) = timeline_event
.thumbnail_url()
.map(|thumbnail_url| thumbnail_store.get_thumbnail(&thumbnail_url))
.unwrap_or(None)
.map(|handle| Image::new(handle.clone()).width(Length::Fill))
{
if does_content_exist {
message_body_widgets.push(create_button(
is_thumbnail,
content_url,
thumbnail_image.width(Length::Units(360)),
media_open_button_state,
));
} else {
let button = create_button(
is_thumbnail,
content_url,
Column::with_children(vec![
Text::new("Download content").into(),
thumbnail_image.width(Length::Units(360)).into(),
]),
media_open_button_state,
);
message_body_widgets.push(button);
}
} else {
let button_label = Text::new(if does_content_exist {
"Open content"
} else {
"Download content"
});
message_body_widgets.push(create_button(
is_thumbnail,
content_url,
button_label,
media_open_button_state,
));
}
}
let mut message_row = vec![Column::with_children(message_body_widgets)
.align_items(Align::Start)
.spacing(4)
.into()];
// FIXME: doesnt work properly
let cur_minute = (cur_timestamp.as_secs() / 60) % 60;
if is_sender_different || last_minute != cur_minute {
last_minute = cur_minute;
let message_timestamp = Text::new(
DateTime::<Local>::from(*timeline_event.origin_server_timestamp())
.format("%H:%M")
.to_string(),
)
.size(14)
.color(Color::from_rgb8(160, 160, 160));
message_row.insert(0, Container::new(message_timestamp).padding(2).into());
} else {
message_row.insert(0, Space::with_width(Length::Units(39)).into());
}
message_group.push(
Row::with_children(message_row)
.align_items(Align::Start)
.spacing(8)
.into(),
);
last_sender = Some(id_to_use);
last_timestamp = *timeline_event.origin_server_timestamp();
}
if !message_group.is_empty() {
event_history = event_history.push(
Container::new(
Column::with_children(message_group.drain(..).collect())
.align_items(Align::Start)
.padding(16)
.spacing(4),
)
.style(crate::ui::style::RoundContainer),
);
}
event_history.into()
}
use iced::{Application, Settings};
use simplelog::*;
use ui::screen::{ScreenManager, StartupFlag};
pub mod client;
pub mod ui;
const LOG_FILE_PATH: &str = concat!(data_dir!(), "log");
pub fn main() {
let mut config = ConfigBuilder::new();
CombinedLogger::init(vec![
TermLogger::new(LevelFilter::Error, config.build(), TerminalMode::Mixed),
WriteLogger::new(
LevelFilter::Error,
config
.set_target_level(LevelFilter::Error)
.set_location_level(LevelFilter::Error)
.build(),
std::fs::File::create(LOG_FILE_PATH).unwrap(),
),
])
.unwrap();
let mut settings = if let Ok(Ok(session)) =
std::fs::read_to_string(client::SESSION_ID_PATH).map(|s| toml::from_str(&s))
{
Settings::with_flags(Some(StartupFlag::UseSession(session)))
} else {
Settings::default()
};
settings.window.size = (1280, 720);
ScreenManager::run(settings).unwrap();
}
use super::{media::ContentType, room::Room};
use ruma::{
api::exports::http::Uri,
events::{
room::{
member::MembershipChange, message::MessageEventContent, redaction::SyncRedactionEvent,
},
AnyMessageEventContent, AnyRoomEvent, AnyStateEventContent, AnySyncMessageEvent,
AnySyncRoomEvent, AnySyncStateEvent, SyncMessageEvent, Unsigned,
},
EventId, RoomVersionId, UserId,
};
use std::{convert::TryFrom, time::SystemTime};
use uuid::Uuid;
pub struct TimelineEvent {
inner: AnySyncRoomEvent,
transaction_id: Option<Uuid>,
}
impl From<AnySyncRoomEvent> for TimelineEvent {
fn from(ev: AnySyncRoomEvent) -> Self {
TimelineEvent::new(ev)
}
}
impl From<AnyRoomEvent> for TimelineEvent {
fn from(ev: AnyRoomEvent) -> Self {
TimelineEvent::new(match ev {
AnyRoomEvent::Message(ev) => AnySyncRoomEvent::Message(ev.into()),
AnyRoomEvent::State(ev) => AnySyncRoomEvent::State(ev.into()),
AnyRoomEvent::RedactedMessage(ev) => AnySyncRoomEvent::RedactedMessage(ev.into()),
AnyRoomEvent::RedactedState(ev) => AnySyncRoomEvent::RedactedState(ev.into()),
})
}
}
impl TimelineEvent {
pub fn new(event: AnySyncRoomEvent) -> Self {
Self {
inner: event,
transaction_id: None,
}
}
pub fn new_unacked_message(content: MessageEventContent, transaction_id: Uuid) -> Self {
Self {
inner: AnySyncRoomEvent::Message(AnySyncMessageEvent::RoomMessage(SyncMessageEvent {
content,
// FIXME: Replace this whole thing with an enum
event_id: ruma::event_id!("$Rqnc-F-dvnEYJTyHq_iKxU2bZ1CI92-kuZq3a5lr5Zg"),
sender: ruma::user_id!("@default:default.com"),
origin_server_ts: SystemTime::now(),
unsigned: Unsigned {
age: None,
transaction_id: None,
},
})),
transaction_id: Some(transaction_id),
}
}
/// Get a formatted string representation of this event.
/// It is recommended to first check if this event should be displayed to the user.
pub fn formatted(&self, room: &Room) -> String {
match self.message_content() {
Some(content) => match content {
AnyMessageEventContent::RoomMessage(msg) => match msg {
MessageEventContent::Image(image) => format!("sent an image: {}", image.body),
MessageEventContent::Video(video) => format!("sent a video: {}", video.body),
MessageEventContent::Audio(audio) => {
format!("sent an audio file: {}", audio.body)
}
MessageEventContent::File(file) => format!("sent a file: {}", file.body),
MessageEventContent::Location(location) => {
format!("sent a location: {}", location.body)
}
MessageEventContent::Notice(notice) => notice.body,
MessageEventContent::ServerNotice(server_notice) => server_notice.body,
MessageEventContent::Text(text) => text.body,
MessageEventContent::Emote(emote) => emote.body,
_ => String::from("Unknown message content"),
},
_ => String::from("Unknown message type"),
},
None => match self.message_redacted_because() {
Some(because) => format!(
"Message deleted by [{}]",
room.get_user_display_name(&because.sender)
),
None => {
if let AnySyncRoomEvent::State(AnySyncStateEvent::RoomMember(member_state)) =
&self.inner
{
let affected_user_name = UserId::try_from(member_state.state_key.as_str())
.map(|id| room.get_user_display_name(&id))
.unwrap_or_else(|_| member_state.state_key.to_string());
let banned_kicked_msg = |action: &str| -> String {
format!(
// TODO: implement reason
"{} [{}]",
action,
affected_user_name,
)
};
match member_state.membership_change() {
MembershipChange::Banned => banned_kicked_msg("banned"),
MembershipChange::KickedAndBanned => {
banned_kicked_msg("kicked and banned")
}
MembershipChange::Kicked => banned_kicked_msg("kicked"),
MembershipChange::Joined => String::from("joined the room"),
MembershipChange::Left => String::from("left the room"),
MembershipChange::ProfileChanged {
displayname_changed,
avatar_url_changed,
} => {
let mut msg = String::new();
if displayname_changed {
if let (Some(Some(prev_display_name)), Some(cur_display_name)) = (
member_state.prev_content.as_ref().map(|c| &c.displayname),
&member_state.content.displayname,
) {
msg = format!(
"changed their display name from {} to {}",
prev_display_name, cur_display_name
);
if avatar_url_changed {
msg = format!("{}\n", msg);
}
}
}
if avatar_url_changed {
msg = format!("{}changed their profile picture", msg);
}
msg
}
_ => String::from("Unknown membership information change"),
}
} else if let Some(content) = self.state_content() {
fn format_room_content_change(
new_data: Option<String>,
change_type: &str,
) -> String {
if let Some(c) = new_data {
format!("changed room {} to \"{}\"", change_type, c)
} else {
format!("removed room {}", change_type)
}
}
match content {
AnyStateEventContent::RoomName(room_name) => {
format_room_content_change(
room_name.name().map(|n| n.to_string()),
"name",
)
}
AnyStateEventContent::RoomTopic(room_topic) => {
format_room_content_change(
if room_topic.topic.is_empty() {
None
} else {
Some(room_topic.topic)
},
"topic",
)
}
AnyStateEventContent::RoomCanonicalAlias(room_canonical_alias) => {
format_room_content_change(
room_canonical_alias.alias.map(|a| a.to_string()),
"canonical alias",
)
}
AnyStateEventContent::RoomHistoryVisibility(
room_history_visibility,
) => format_room_content_change(
Some(room_history_visibility.history_visibility.to_string()),
"history visibility",
),
AnyStateEventContent::RoomJoinRules(room_join_rules) => {
format_room_content_change(
Some(room_join_rules.join_rule.to_string()),
"join rule",
)
}
AnyStateEventContent::RoomCreate(_) => {
String::from("created and configured the room")
}
_ => String::from("Unknown state type"),
}
} else {
String::from("Unknown event type")
}
}
},
}
}
pub fn content_type(&self) -> Option<ContentType> {
if let Some(content) = self.message_content() {
if let AnyMessageEventContent::RoomMessage(content) = content {
return match content {
MessageEventContent::Image(_) => Some(ContentType::Image),
MessageEventContent::Video(_) => Some(ContentType::Video),
MessageEventContent::Audio(_) => Some(ContentType::Audio),
MessageEventContent::File(file) => Some(ContentType::Other {
mimetype: file
.info
.map(|i| i.mimetype.unwrap_or_default())
.unwrap_or_default(),
}),
_ => None,
};
}
}
None
}
pub fn content_url(&self) -> Option<Uri> {
if let Some(content) = self.message_content() {
if let AnyMessageEventContent::RoomMessage(content) = content {
return match content {
MessageEventContent::Image(image) => image.url,
MessageEventContent::Video(video) => video.url,
MessageEventContent::Audio(audio) => audio.url,
MessageEventContent::File(file) => file.url,
_ => None,
}
.map(|u| u.parse::<Uri>().map_or_else(|_| None, Some))
.unwrap_or(None);
}
}
None
}
pub fn thumbnail_url(&self) -> Option<Uri> {
if let Some(content) = self.message_content() {
if let AnyMessageEventContent::RoomMessage(content) = content {
return match content {
MessageEventContent::Image(image) => {
let content_url = image.url.unwrap_or_default();
image.info.map(|i| i.thumbnail_url.unwrap_or(content_url))
}
MessageEventContent::Video(video) => {
video.info.map(|i| i.thumbnail_url.unwrap_or_default())
}
_ => None,
}
.map(|u| u.parse::<Uri>().map_or_else(|_| None, Some))
.unwrap_or(None);
}
}
None
}
/// Check if we should show this event to the user.
pub fn should_show_to_user(&self) -> bool {
match self.message_content() {
Some(content) => matches!(content, AnyMessageEventContent::RoomMessage(_)),
None => match self.message_redacted_because() {
Some(_) => true,
None => {
if let AnySyncRoomEvent::State(AnySyncStateEvent::RoomMember(member_state)) =
&self.inner
{
matches!(
member_state.membership_change(),
MembershipChange::Kicked
| MembershipChange::Banned
| MembershipChange::KickedAndBanned
| MembershipChange::Left
| MembershipChange::Joined
| MembershipChange::ProfileChanged {
displayname_changed: true,
avatar_url_changed: true,
}
| MembershipChange::ProfileChanged {
displayname_changed: true,
avatar_url_changed: false,
}
| MembershipChange::ProfileChanged {
displayname_changed: false,
avatar_url_changed: true,
}
)
} else if let Some(content) = self.state_content() {
matches!(
content,
AnyStateEventContent::RoomName(_)
| AnyStateEventContent::RoomTopic(_)
| AnyStateEventContent::RoomCanonicalAlias(_)
| AnyStateEventContent::RoomHistoryVisibility(_)
| AnyStateEventContent::RoomJoinRules(_)
| AnyStateEventContent::RoomCreate(_)
)
} else {
false
}
}
},
}
}
pub fn id(&self) -> &EventId {
match &self.inner {
AnySyncRoomEvent::Message(ev) => ev.event_id(),
AnySyncRoomEvent::RedactedMessage(ev) => ev.event_id(),
AnySyncRoomEvent::State(ev) => ev.event_id(),
AnySyncRoomEvent::RedactedState(ev) => ev.event_id(),
}
}
pub fn transaction_id(&self) -> Option<&Uuid> {
self.transaction_id.as_ref()
}
pub fn sender(&self) -> &UserId {
match &self.inner {
AnySyncRoomEvent::Message(ev) => ev.sender(),
AnySyncRoomEvent::RedactedMessage(ev) => ev.sender(),
AnySyncRoomEvent::State(ev) => ev.sender(),
AnySyncRoomEvent::RedactedState(ev) => ev.sender(),
}
}
pub fn origin_server_timestamp(&self) -> &SystemTime {
match &self.inner {
AnySyncRoomEvent::Message(ev) => ev.origin_server_ts(),
AnySyncRoomEvent::RedactedMessage(ev) => ev.origin_server_ts(),
AnySyncRoomEvent::State(ev) => ev.origin_server_ts(),
AnySyncRoomEvent::RedactedState(ev) => ev.origin_server_ts(),
}
}
pub fn is_message(&self) -> bool {
matches!(&self.inner, AnySyncRoomEvent::Message(_))
}
pub fn is_redacted_message(&self) -> bool {
matches!(&self.inner, AnySyncRoomEvent::RedactedMessage(_))
}
pub fn message_content(&self) -> Option<AnyMessageEventContent> {
if let AnySyncRoomEvent::Message(ev) = &self.inner {
Some(ev.content())
} else {
None
}
}
pub fn message_redacted_because(&self) -> Option<&SyncRedactionEvent> {
if let AnySyncRoomEvent::RedactedMessage(ev) = &self.inner {
ev.unsigned().redacted_because.as_deref()
} else {
None
}
}
pub fn is_state(&self) -> bool {
matches!(&self.inner, AnySyncRoomEvent::State(_))
}
pub fn is_redacted_state(&self) -> bool {
matches!(&self.inner, AnySyncRoomEvent::RedactedState(_))
}
pub fn state_content(&self) -> Option<AnyStateEventContent> {
if let AnySyncRoomEvent::State(ev) = &self.inner {
Some(ev.content())
} else {
None
}
}
pub fn state_redacted_because(&self) -> Option<&SyncRedactionEvent> {
if let AnySyncRoomEvent::RedactedState(ev) = &self.inner {
ev.unsigned().redacted_because.as_deref()
} else {
None
}
}
/// Check if this event is acknowledged by the server.
pub fn is_ack(&self) -> bool {
self.transaction_id.is_none()
}
pub fn acks_transaction(&self) -> Option<Uuid> {
if let AnySyncRoomEvent::Message(ref msg_event) = self.inner {
if let AnySyncMessageEvent::RoomMessage(event) = msg_event {
if let Some(Ok(uuid)) = event.unsigned.transaction_id.as_ref().map(|s| s.parse()) {
return Some(uuid);
}
}
}
None
}
pub fn redacts(&self) -> Option<&EventId> {
match &self.inner {
AnySyncRoomEvent::Message(ev) => {
if let AnySyncMessageEvent::RoomRedaction(ev) = ev {
Some(&ev.redacts)
} else {
None
}
}
_ => None,
}
}
/// Redact the inner Matrix event.
pub fn redact(self, redaction_event: &TimelineEvent, room_version: RoomVersionId) -> Self {
let mut redacted = self;
redacted.inner = if let AnySyncRoomEvent::Message(AnySyncMessageEvent::RoomRedaction(rev)) =
&redaction_event.inner
{
match redacted.inner {
AnySyncRoomEvent::Message(ev) => {
AnySyncRoomEvent::RedactedMessage(ev.redact(rev.clone(), room_version))
}
AnySyncRoomEvent::State(ev) => {
AnySyncRoomEvent::RedactedState(ev.redact(rev.clone(), room_version))
}
_ => redacted.inner,
}
} else {
redacted.inner
};
redacted
}
}
impl PartialEq for TimelineEvent {
fn eq(&self, other: &Self) -> bool {
self.id() == other.id()
}
}
impl Eq for TimelineEvent {}
use super::timeline_event::TimelineEvent;
use ruma::{
events::room::member::MembershipChange, EventId, RoomAliasId, RoomId, RoomVersionId, UserId,
};
use std::{
collections::HashMap,
time::{Duration, Instant},
};
pub type Members = HashMap<UserId, Member>;
pub struct Member {
display_name: Option<String>,
display_user: bool,
typing_received: Option<Duration>,
}
impl Default for Member {
fn default() -> Self {
Self {
display_name: None,
display_user: true,
typing_received: None,
}
}
}
impl Member {
pub fn new() -> Self {
Self::default()
}
pub fn display_name(&self) -> Option<&str> {
self.display_name.as_deref()
}
pub fn is_typing(&self) -> bool {
self.typing_received.is_some()
}
pub fn set_display_name(&mut self, new_display_name: Option<String>) {
self.display_name = new_display_name;
}
pub fn set_display(&mut self, display: bool) {
self.display_user = display;
}
pub fn set_typing(&mut self, typing_recieved: Option<Duration>) {
self.typing_received = typing_recieved;
}
}
pub type Rooms = HashMap<RoomId, Room>;
pub struct Room {
version: RoomVersionId,
name: Option<String>,
canonical_alias: Option<RoomAliasId>,
alt_aliases: Vec<RoomAliasId>,
timeline: Vec<TimelineEvent>,
members: Members,
display_name_to_user_id: HashMap<String, Vec<UserId>>,
}
impl Default for Room {
fn default() -> Self {
Self {
// FIXME: take this as arg
version: RoomVersionId::Version5,
name: None,
canonical_alias: None,
alt_aliases: vec![],
timeline: vec![],
members: Members::new(),
display_name_to_user_id: HashMap::new(),
}
}
}
impl Room {
pub fn new() -> Self {
Self::default()
}
/// Get the name of this room.
pub fn name(&self) -> Option<&str> {
self.name.as_deref()
}
/// Get the canonical alias of this room.
pub fn canonical_alias(&self) -> Option<&str> {
self.canonical_alias.as_ref().map(|s| s.as_str())
}
/// Get the alternative aliases of this room.
pub fn alt_aliases(&self) -> &[RoomAliasId] {
self.alt_aliases.as_slice()
}
/// Get all events in the timeline.
pub fn timeline(&self) -> &[TimelineEvent] {
self.timeline.as_slice()
}
/// Get all the displayable events in the timeline.
pub fn displayable_events(&self) -> Vec<&TimelineEvent> {
self.timeline()
.iter()
.filter(|event| event.should_show_to_user())
.collect()
}
/// Get the oldest event in the timeline.
pub fn oldest_event(&self) -> Option<&TimelineEvent> {
self.timeline.first()
}
/// Get the newest event in the timeline.
pub fn newest_event(&self) -> Option<&TimelineEvent> {
self.timeline.last()
}
/// Get all members in this room.
pub fn members(&self) -> &Members {
&self.members
}
pub fn get_member(&self, user_id: &UserId) -> Option<&Member> {
self.members.get(user_id)
}
pub fn get_member_mut(&mut self, user_id: &UserId) -> Option<&mut Member> {
self.members.get_mut(user_id)
}
/// Get all typing members in this room.
pub fn typing_members(&self) -> Vec<&UserId> {
self.members
.iter()
.filter(|(_, member)| member.is_typing())
.map(|(id, _)| id)
.collect()
}
/// Get room display name formatted according to the specification.
pub fn get_display_name(&self) -> String {
match &self.name {
Some(name) => name.clone(),
None => match &self.canonical_alias {
Some(alias) => alias.to_string(),
None => match self.members.len() {
// FIXME: Use "heroes" here according to the spec
// These unwraps are safe since we check the length beforehand
x if x > 2 => format!(
"{}, {} and {} others",
self.get_user_display_name(self.members.keys().next().unwrap()),
self.get_user_display_name(self.members.keys().nth(1).unwrap()),
self.members.len() - 2
),
2 => format!(
"{} and {}",
self.get_user_display_name(self.members.keys().next().unwrap()),
self.get_user_display_name(self.members.keys().nth(1).unwrap()),
),
_ => String::from("Empty room"),
},
},
}
}
/// Get a user's display name (disambugiated name) according to the specification.
pub fn get_user_display_name(&self, user_id: &UserId) -> String {
if let Some(member) = self.members.get(user_id) {
if let Some(name) = member.display_name() {
if let Some(ids) = self.display_name_to_user_id.get(name) {
if ids.len() > 1 {
return format!("{} ({})", name, user_id);
}
}
return name.to_string();
}
}
user_id.to_string()
}
pub fn update_typing(&mut self, typing_member_ids: &[UserId]) {
for member in self.members.values_mut() {
member.set_typing(None);
}
for member_id in typing_member_ids {
if let Some(member) = self.members.get_mut(member_id) {
member.set_typing(Some(Instant::now().elapsed()))
}
}
}
pub fn update_member(
&mut self,
prev_displayname: Option<Option<String>>,
displayname: Option<String>,
membership_change: MembershipChange,
user_id: UserId,
) {
self.members
.entry(user_id.clone())
.and_modify(|member| member.set_display_name(displayname.clone()))
.or_insert_with(move || {
let mut new_member = Member::new();
new_member.set_display_name(displayname);
new_member
});
if let MembershipChange::Left = membership_change {
for ids in self.display_name_to_user_id.values_mut() {
if let Some(index) = ids.iter().position(|id| id == &user_id) {
ids.remove(index);
}
}
if let Some(member) = self.get_member_mut(&user_id) {
member.set_display(false);
}
} else if let MembershipChange::Joined = membership_change {
// This unwrap is safe since we add a member if they don't exist beforehand
if let Some(name) = self.members.get(&user_id).unwrap().display_name() {
let ids = self
.display_name_to_user_id
.entry(name.to_string())
.or_insert_with(|| vec![user_id.clone()]);
if !ids.contains(&user_id) {
ids.push(user_id.clone());
}
}
if let Some(member) = self.get_member_mut(&user_id) {
member.set_display(true);
}
} else if let MembershipChange::ProfileChanged {
displayname_changed,
avatar_url_changed: _,
} = membership_change
{
if displayname_changed {
if let Some(Some(name)) = prev_displayname {
if let Some(ids) = self.display_name_to_user_id.get_mut(&name) {
if let Some(index) = ids.iter().position(|id| id == &user_id) {
ids.remove(index);
}
}
}
// This unwrap is safe since we add a member if they don't exist beforehand
if let Some(name) = self.members.get(&user_id).unwrap().display_name() {
if let Some(ids) = self.display_name_to_user_id.get_mut(name) {
ids.push(user_id);
}
}
}
}
}
pub fn add_chunk_of_events(
&mut self,
events_before: Vec<TimelineEvent>,
events_after: Vec<TimelineEvent>,
point_event_id: &EventId,
) {
if let Some(point_index) = self
.timeline
.iter()
.position(|tevent| tevent.id() == point_event_id)
{
let mut point_index_offset = 0;
let mut i = point_index;
for event in events_before {
if let Some(ci) = i.checked_sub(1) {
if event != self.timeline[ci] {
self.timeline.insert(i, event);
point_index_offset += 1;
} else {
i -= 1;
}
} else {
self.timeline.insert(0, event);
point_index_offset += 1;
}
}
i = point_index + point_index_offset;
for event in events_after {
if i + 1 < self.timeline.len() {
if event != self.timeline[i + 1] {
self.timeline.insert(i + 1, event);
} else {
i += 1;
}
} else {
self.timeline.insert(self.timeline.len(), event);
i += 1;
}
}
}
}
pub fn add_event(&mut self, event: TimelineEvent) {
if !event.is_ack() || !self.timeline.contains(&event) {
self.timeline.push(event);
}
}
pub fn redact_event(&mut self, redaction_event: &TimelineEvent) {
if let Some(rid) = redaction_event.redacts() {
if let Some(index) = self.timeline.iter().position(|tevent| tevent.id() == rid) {
let redacted_tevent = self
.timeline
.remove(index)
.redact(redaction_event, self.version.clone());
self.timeline.insert(index, redacted_tevent);
}
}
}
pub fn ack_event(&mut self, ack_event: &TimelineEvent) {
if let Some(index) = self
.timeline
.iter()
.position(|tevent| tevent.transaction_id() == ack_event.acks_transaction().as_ref())
{
self.timeline.remove(index);
}
}
/// Set the name of this room.
pub fn set_name(&mut self, name: Option<String>) {
self.name = name;
}
/// Set the canonical alias of this room.
pub fn set_canonical_alias(&mut self, canonical_alias: Option<RoomAliasId>) {
self.canonical_alias = canonical_alias;
}
/// Set alternative aliases of this room.
pub fn set_alt_aliases(&mut self, alt_aliases: Vec<RoomAliasId>) {
self.alt_aliases = alt_aliases;
}
}
use assign::assign;
pub use room::{Room, Rooms};
use ruma::{
api::client::r0::media::get_content,
api::{
client::r0::{
context::get_context,
filter::{FilterDefinition, LazyLoadOptions, RoomEventFilter, RoomFilter},
message::send_message_event,
session::logout,
sync::sync_events,
typing::create_typing_event,
},
exports::{
http::{self, Uri},
serde::{Deserialize, Serialize},
},
},
events::{
room::{aliases::AliasesEventContent, canonical_alias::CanonicalAliasEventContent},
typing::TypingEventContent,
AnyEphemeralRoomEventContent, AnyMessageEventContent, AnyRoomEvent, AnySyncStateEvent,
SyncStateEvent,
},
presence::PresenceState,
DeviceId, EventId, Raw, RoomId, UserId,
};
pub use ruma_client::{
Client as InnerClient, Identification as InnerIdentification, Session as InnerSession,
};
use std::{
convert::TryFrom,
convert::TryInto,
fmt::{self, Debug, Display, Formatter},
time::Duration,
};
pub use timeline_event::TimelineEvent;
use uuid::Uuid;
use self::media::make_content_path;
pub mod media;
pub mod room;
pub mod timeline_event;
#[macro_export]
macro_rules! data_dir {
() => {
"data/"
};
}
pub const SESSION_ID_PATH: &str = concat!(data_dir!(), "session");
#[cfg(target_os = "linux")]
pub const CLIENT_ID: &str = "icy_matrix Linux";
#[cfg(target_os = "windows")]
pub const CLIENT_ID: &str = "icy_matrix Windows";
#[cfg(target_os = "macos")]
pub const CLIENT_ID: &str = "icy_matrix MacOS";
/// A sesssion struct with our requirements (unlike the `InnerSession` type)
#[derive(Clone, Deserialize, Serialize)]
pub struct Session {
pub access_token: String,
pub user_id: UserId,
pub device_id: Box<DeviceId>,
}
impl Debug for Session {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Session")
.field("user_id", &self.user_id.to_string())
.field("device_id", &self.device_id.to_string())
.finish()
}
}
impl Display for Session {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
f,
"Session for user {} on device {}",
self.user_id, self.device_id
)
}
}
impl Into<InnerSession> for Session {
fn into(self) -> InnerSession {
InnerSession {
identification: Some(InnerIdentification {
user_id: self.user_id,
device_id: self.device_id,
}),
access_token: self.access_token,
}
}
}
impl TryFrom<InnerSession> for Session {
type Error = ClientError;
fn try_from(value: InnerSession) -> Result<Self, Self::Error> {
let (access_token, user_id, device_id) = if let Some(id) = value.identification {
(value.access_token, id.user_id, id.device_id)
} else {
return Err(ClientError::MissingLoginInfo);
};
Ok(Self {
access_token,
user_id,
device_id,
})
}
}
pub struct Client {
/* The inner client stores the session (with our requirements,
since we only allow `Client` creation when they are met),
so we don't need to store it here again. */
inner: InnerClient,
rooms: Rooms,
next_batch: Option<String>,
}
impl Debug for Client {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("Client")
.field("user_id", &self.current_user_id().to_string())
.finish()
}
}
impl Client {
pub async fn new(
homeserver: &str,
username: &str,
password: &str,
) -> Result<Self, ClientError> {
tokio::fs::create_dir_all(format!("{}content", data_dir!())).await?;
let homeserver_url = homeserver
.parse::<Uri>()
.map_err(|e| ClientError::URLParse(homeserver.to_owned(), e))?;
let inner = InnerClient::new(homeserver_url, None);
let mut device_id = None;
if let Ok(s) = tokio::fs::read_to_string(SESSION_ID_PATH).await {
if let Ok(session) = toml::from_str::<Session>(&s) {
device_id = Some(session.device_id);
}
}
let session = {
Session::try_from(
inner
.log_in(username, password, device_id.as_deref(), Some(CLIENT_ID))
.await?,
)?
};
// Save the session
if let Ok(encoded_session) = toml::to_vec(&session) {
// Do not abort the sync if we can't save the session data
if let Err(err) = tokio::fs::write(SESSION_ID_PATH, encoded_session).await {
log::error!("Could not save session data: {}", err);
} else {
use std::os::unix::fs::PermissionsExt;
if let Err(err) = tokio::fs::set_permissions(
SESSION_ID_PATH,
std::fs::Permissions::from_mode(0o600),
)
.await
{
log::error!("Could not set permissions of session file: {}", err);
}
}
}
Ok(Self {
inner,
rooms: Rooms::new(),
next_batch: None,
})
}
pub fn new_with_session(session: Session) -> Result<Self, ClientError> {
let homeserver = format!("https://{}", session.user_id.server_name());
let homeserver_url = homeserver
.parse::<Uri>()
.map_err(|e| ClientError::URLParse(homeserver, e))?;
let inner = InnerClient::new(homeserver_url, Some(session.into()));
Ok(Self {
inner,
rooms: Rooms::new(),
next_batch: None,
})
}
pub async fn logout(inner: InnerClient) -> Result<(), ClientError> {
inner.request(logout::Request::new()).await?;
tokio::fs::remove_file(SESSION_ID_PATH).await?;
Ok(())
}
pub fn current_user_id(&self) -> UserId {
self.inner
.session()
// This unwrap is safe since we check if there is a session beforehand
.unwrap()
.identification
// This unwrap is safe since we check if there is a user_id beforehand
.unwrap()
.user_id
}
pub fn next_batch(&self) -> Option<String> {
self.next_batch.clone()
}
pub async fn initial_sync(&mut self) -> Result<(), ClientError> {
let lazy_load_filter = Client::member_lazy_load_sync_filter();
let initial_sync_response = self
.inner
.request(assign!(sync_events::Request::new(), {
filter: Some(
// Lazy load room members here to ensure a fast login
// FIXME: Some members do not load properly after this
&lazy_load_filter
),
since: self.next_batch.as_deref(),
full_state: false,
set_presence: &PresenceState::Online,
timeout: None,
}))
.await?;
self.process_sync_response(initial_sync_response);
Ok(())
}
fn member_lazy_load_sync_filter<'a>() -> sync_events::Filter<'a> {
sync_events::Filter::FilterDefinition(assign!(FilterDefinition::default(), {
room: assign!(RoomFilter::default(), {
state: Client::member_lazy_load_room_event_filter()
}),
}))
}
fn member_lazy_load_room_event_filter<'a>() -> RoomEventFilter<'a> {
assign!(RoomEventFilter::default(), {
lazy_load_options: LazyLoadOptions::Enabled {
include_redundant_members: false,
}
}
)
}
pub fn inner(&self) -> InnerClient {
self.inner.clone()
}
pub fn rooms(&self) -> &Rooms {
&self.rooms
}
/// Removes a room from the stored rooms.
pub fn remove_room(&mut self, room_id: &RoomId) {
self.rooms.remove(room_id);
}
pub fn get_room(&self, room_id: &RoomId) -> Option<&Room> {
self.rooms.get(room_id)
}
pub fn get_room_mut(&mut self, room_id: &RoomId) -> Option<&mut Room> {
self.rooms.get_mut(room_id)
}
pub fn get_room_mut_or_create(&mut self, room_id: RoomId) -> &mut Room {
self.rooms.entry(room_id).or_insert_with(Room::new)
}
pub async fn download_content(
inner: InnerClient,
content_url: Uri,
) -> Result<Vec<u8>, ClientError> {
Ok(inner
.request(get_content::Request::new(
content_url.path().trim_matches('/'),
content_url
.authority()
.unwrap()
.as_str()
.try_into()
.unwrap(),
))
.await?)
.map(|response| response.file)
}
pub async fn send_typing(
inner: InnerClient,
room_id: RoomId,
current_user_id: UserId,
) -> Result<create_typing_event::Response, ClientError> {
let response = inner
.request(create_typing_event::Request::new(
¤t_user_id,
&room_id,
create_typing_event::Typing::Yes(Duration::from_secs(1)),
))
.await?;
Ok(response)
}
pub async fn send_message(
inner: InnerClient,
content: AnyMessageEventContent,
room_id: RoomId,
txn_id: Uuid,
) -> Result<send_message_event::Response, ClientError> {
inner
.request(send_message_event::Request::new(
&room_id,
txn_id.to_string().as_str(),
&content,
))
.await
.map_err(ClientError::Internal)
}
pub async fn get_events_around(
inner: InnerClient,
room_id: RoomId,
event_id: EventId,
) -> Result<get_context::Response, ClientError> {
let rooms = [room_id];
inner
.request(assign!(get_context::Request::new(&rooms[0], &event_id), {
// We lazy load members here since they will be incrementally sent by the sync response after initial sync
filter: Some(assign!(Client::member_lazy_load_room_event_filter(), {
rooms: Some(&rooms),
})),
}))
.await
.map_err(ClientError::Internal)
}
pub fn process_events_around_response(
&mut self,
response: get_context::Response,
) -> (Vec<Uri>, Vec<Uri>) {
let mut download_urls = vec![];
let mut read_urls = vec![];
let get_context::Response {
events_before,
event: maybe_raw_event,
events_after,
..
} = response;
if let Some(raw_event) = maybe_raw_event {
if let Ok(event) = raw_event.deserialize() {
fn convert_room_to_sync_room_with_id(event: AnyRoomEvent) -> (RoomId, EventId) {
match event {
AnyRoomEvent::Message(ev) => (ev.room_id().clone(), ev.event_id().clone()),
AnyRoomEvent::State(ev) => (ev.room_id().clone(), ev.event_id().clone()),
AnyRoomEvent::RedactedMessage(ev) => {
(ev.room_id().clone(), ev.event_id().clone())
}
AnyRoomEvent::RedactedState(ev) => {
(ev.room_id().clone(), ev.event_id().clone())
}
}
}
fn convert_to_timeline_event(
raw_events: Vec<Raw<AnyRoomEvent>>,
) -> Vec<TimelineEvent> {
raw_events
.into_iter()
.flat_map(|r| r.deserialize())
.map(|e| e.into())
.collect()
}
let (room_id, event_id) = convert_room_to_sync_room_with_id(event);
if let Some(room) = self.get_room_mut(&room_id) {
let events_before = convert_to_timeline_event(events_before);
let events_after = convert_to_timeline_event(events_after);
for ev in events_after.iter().chain(events_before.iter()) {
if let Some(content_url) = ev.thumbnail_url() {
if make_content_path(&content_url).exists() {
read_urls.push(content_url)
} else {
download_urls.push(content_url);
}
}
}
room.add_chunk_of_events(events_before, events_after, &event_id);
}
}
}
(download_urls, read_urls)
}
pub fn process_sync_response(
&mut self,
response: sync_events::Response,
) -> (Vec<Uri>, Vec<Uri>) {
let mut download_urls = vec![];
let mut read_urls = vec![];
for (room_id, joined_room) in response.rooms.join {
let room = self.get_room_mut_or_create(room_id);
for event in joined_room
.ephemeral
.events
.iter()
.flat_map(|r| r.deserialize())
{
if let AnyEphemeralRoomEventContent::Typing(TypingEventContent { user_ids }) =
event.content()
{
room.update_typing(user_ids.as_slice());
}
}
for event in joined_room
.state
.events
.iter()
.flat_map(|r| r.deserialize())
{
match event {
AnySyncStateEvent::RoomAliases(SyncStateEvent {
content: AliasesEventContent { aliases, .. },
..
}) => {
room.set_alt_aliases(aliases);
}
AnySyncStateEvent::RoomName(SyncStateEvent { content, .. }) => {
room.set_name(content.name().map(|s| s.to_string()));
}
AnySyncStateEvent::RoomCanonicalAlias(SyncStateEvent {
content:
CanonicalAliasEventContent {
alias, alt_aliases, ..
},
..
}) => {
room.set_canonical_alias(alias);
room.set_alt_aliases(alt_aliases);
}
// TODO: Make UI to show users
AnySyncStateEvent::RoomMember(member_state) => {
let membership_change = member_state.membership_change();
room.update_member(
member_state.prev_content.map(|c| c.displayname),
member_state.content.displayname,
membership_change,
member_state.sender,
);
}
_ => {}
}
}
for event in joined_room
.timeline
.events
.iter()
.flat_map(|r| r.deserialize())
{
let tevent = TimelineEvent::new(event);
room.ack_event(&tevent);
room.redact_event(&tevent);
if let Some(content_url) = tevent.thumbnail_url() {
if make_content_path(&content_url).exists() {
read_urls.push(content_url)
} else {
download_urls.push(content_url);
}
}
room.add_event(tevent);
}
}
for (room_id, _) in response.rooms.leave {
self.remove_room(&room_id);
}
self.next_batch = Some(response.next_batch);
(download_urls, read_urls)
}
}
#[derive(Debug)]
pub enum ClientError {
/// Error occurred during an IO operation.
IOError(std::io::Error),
/// Error occurred while parsing a string as URL.
URLParse(String, http::uri::InvalidUri),
/// Error occurred in the Matrix client library.
Internal(ruma_client::Error<ruma::api::client::Error>),
/// The user is already logged in.
AlreadyLoggedIn,
/// Not all required login information was provided.
MissingLoginInfo,
}
impl From<ruma_client::Error<ruma::api::client::Error>> for ClientError {
fn from(other: ruma_client::Error<ruma::api::client::Error>) -> Self {
Self::Internal(other)
}
}
impl From<std::io::Error> for ClientError {
fn from(other: std::io::Error) -> Self {
Self::IOError(other)
}
}
impl Display for ClientError {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
use ruma::{api::client::error::ErrorKind as ClientAPIErrorKind, api::error::*};
use ruma_client::Error as InnerClientError;
match self {
ClientError::URLParse(string, err) => {
write!(fmt, "Could not parse URL '{}': {}", string, err)
}
ClientError::Internal(err) => {
match err {
InnerClientError::FromHttpResponse(FromHttpResponseError::Http(
ServerError::Known(err),
)) => match err.kind {
ClientAPIErrorKind::Forbidden => {
return write!(
fmt,
"The server rejected your login information: {}",
err.message
);
}
ClientAPIErrorKind::Unauthorized => {
return write!(
fmt,
"You are unauthorized to perform an operation: {}",
err.message
);
}
ClientAPIErrorKind::UnknownToken { soft_logout: _ } => {
return write!(
fmt,
"Your session has expired, please login again: {}",
err.message
);
}
_ => {}
},
InnerClientError::Response(_) => {
return write!(
fmt,
"Please check if you can connect to the internet and try again: {}",
err,
);
}
InnerClientError::AuthenticationRequired => {
return write!(
fmt,
"Authentication is required for an operation, please login (again)",
);
}
_ => {}
}
write!(fmt, "An internal error occurred: {}", err.to_string())
}
ClientError::IOError(err) => write!(fmt, "An IO error occurred: {}", err),
ClientError::AlreadyLoggedIn => write!(fmt, "Already logged in with another user."),
ClientError::MissingLoginInfo => {
write!(fmt, "Missing required login information, can't login.")
}
}
}
}
use std::path::PathBuf;
pub use iced::image::Handle as ImageHandle;
use iced_native::image::Data;
use indexmap::IndexMap;
use ruma::api::exports::http::Uri;
pub fn make_content_path(content_url: &Uri) -> PathBuf {
make_content_folder(content_url).join(make_content_filename(content_url))
}
pub fn make_content_filename(content_url: &Uri) -> PathBuf {
let filename = content_url.path()[1..].to_string();
PathBuf::from(filename)
}
pub fn make_content_folder(content_url: &Uri) -> PathBuf {
let server_media_dir = format!(
"{}content/{}",
crate::data_dir!(),
content_url.authority().unwrap().as_str().replace('.', "_")
);
PathBuf::from(server_media_dir)
}
pub fn get_in_memory(handle: &ImageHandle) -> &[u8] {
match handle.data() {
Data::Bytes(raw) => raw.as_slice(),
_ => panic!(),
}
}
const MAX_CACHE_SIZE: usize = 1000 * 1000 * 100; // 100Mb
pub struct ThumbnailStore(IndexMap<Uri, ImageHandle>);
impl ThumbnailStore {
pub fn new() -> Self {
Self(IndexMap::new())
}
pub fn put_thumbnail(&mut self, thumbnail_url: Uri, thumbnail: ImageHandle) {
let cache_size: usize = self.0.values().map(|h| get_in_memory(h).len()).sum();
let thumbnail_size = get_in_memory(&thumbnail).len();
if cache_size + thumbnail_size > MAX_CACHE_SIZE {
let mut current_size = 0;
let mut remove_upto = 0;
for (index, size) in self.0.values().map(|h| get_in_memory(h).len()).enumerate() {
if current_size >= thumbnail_size {
remove_upto = index + 1;
break;
}
current_size += size;
}
for index in 0..remove_upto {
self.0.shift_remove_index(index);
}
} else {
self.0.insert(thumbnail_url, thumbnail);
}
}
pub fn get_thumbnail(&self, thumbnail_url: &Uri) -> Option<&ImageHandle> {
self.0.get(thumbnail_url)
}
pub fn invalidate_thumbnail(&mut self, thumbnail_url: &Uri) {
self.0.remove(thumbnail_url);
}
}
#[derive(Debug, Clone)]
pub enum ContentType {
Image,
Audio,
Video,
Other { mimetype: String },
}
impl ContentType {
pub fn new(mimetype: String) -> Self {
use ContentType::*;
if let Some(filetype) = mimetype.split('/').next() {
return match filetype {
"image" => Image,
"audio" => Audio,
"video" => Video,
_ => Other { mimetype },
};
}
Other { mimetype }
}
}
impl From<String> for ContentType {
fn from(other: String) -> Self {
ContentType::new(other)
}
}
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
name = "icy_matrix";
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputes = with pkgs; [ x11 alsaLib ];
}
:1 cefea3a243135243356297866e4555467aeb41f5
:2 d7a91abd7f4b6ff524a6dca0cbdaf7510547d546
:3 51bb8f3e52b8de5cf6af6a791ed86fe55ca6f8ca
:4 45f43e9104af62c03c2bf04ce934f4228210b695
:5 d10145ff8af1572692736902ba9ebf2a5198e9f7
:6 b432beaec3672f5025dfd06bc9ab8f6875bf10c3
:7 9c314cf6b712349e0e06dd03e90632e1896180d6
:8 53456b5c3bba4218a3c29f687fb327f4870f2e48
:9 4b4e08d9e842e4b0f2b214ed51265aff29a4060e
:10 d0f29041232455fd505abbd988b7a6f1b35a1cbb
:11 55fb3679c6954c4c97fb2c3f5b05bf91af472095
:12 e4917a45c7006185f2fbd2eab016a70e11086f1b
:13 880a4dd8c9ada2d4bbd90e10459522b1dd1fe963
:14 406592347746a28c7ec8efc6346251348e00bb5a
:15 8b3e0d8b944ed663f813e427a5bacfc2c91d1b85
:16 33b8c7146b1d5901c3c309675c9c297b8bbc6e09
:17 c8593b6555728d4008255c7100ccc3deba22f102
:18 bfe68a6bc4440fb642c05806a5d929a44b64d185
:19 550083cc07eab095398ad8806b7282261ec75041
:20 919d885c1ceccd473b638533034239e5c10241e7
:21 620c7584ab85c0616d3084174fbe9b353cacf6cd
:22 192cbf59f686dd142025c5770f5ac936b348bb6a
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
icy_matrix
Copyright (C) 2020 Yusuf Bera Ertan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
icy_matrix Copyright (C) 2020 Yusuf Bera Ertan
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
[package]
name = "icy_matrix"
version = "0.1.0"
authors = ["Yusuf Bera Ertan <y.bera003.06@protonmail.com>"]
edition = "2018"
[profile.dev]
opt-level = 1
[profile.release]
lto = "thin"
panic = "abort"
[dependencies]
iced = { path = "../iced", features = ["tokio", "image"] }
iced_native = { path = "../iced/native" }
iced_futures = { path = "../iced/futures" }
ruma = { git = "https://github.com/ruma/ruma/", features = ["client-api"], branch = "main" }
ruma-client = { git = "https://github.com/ruma/ruma/", branch = "main" }
assign = "1.1.0"
serde = { version = "1.0", features = ["derive"] }
toml = "0.5"
tokio = { version = "0.2", features = ["rt-core", "parking_lot", "time", "fs"] }
indexmap = "1.6.0"
open = "1.4.0"
uuid = { version = "0.8.1", features = ["v4"] }
chrono = "0.4.19"
log = "0.4.11"
simplelog = "0.8.0"
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "ab_glyph"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26a685fe66654266f321a8b572660953f4df36a2135706503a4c89981d76e1a2"
dependencies = [
"ab_glyph_rasterizer",
"owned_ttf_parser 0.8.0",
]
[[package]]
name = "ab_glyph_rasterizer"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff"
[[package]]
name = "adler"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
[[package]]
name = "adler32"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
[[package]]
name = "andrew"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf"
dependencies = [
"bitflags",
"rusttype",
"walkdir",
"xdg",
"xml-rs",
]
[[package]]
name = "approx"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278"
dependencies = [
"num-traits",
]
[[package]]
name = "arrayref"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
[[package]]
name = "arrayvec"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "ash"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c69a8137596e84c22d57f3da1b5de1d4230b1742a710091c85f4d7ce50f00f38"
dependencies = [
"libloading",
]
[[package]]
name = "assign"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4af5687fe33aec5e70ef14caac5e0d363e335e5e5d6385fb75978d0c241b1d67"
[[package]]
name = "autocfg"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "base64"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
[[package]]
name = "bit-set"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de"
dependencies = [
"bit-vec",
]
[[package]]
name = "bit-vec"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3"
[[package]]
name = "bitflags"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "blake2b_simd"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
dependencies = [
"arrayref",
"arrayvec",
"constant_time_eq",
]
[[package]]
name = "block"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
[[package]]
name = "bumpalo"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708"
[[package]]
name = "bumpalo"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"
[[package]]
name = "bytemuck"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41aa2ec95ca3b5c54cf73c91acf06d24f4495d5f1b1c12506ae3483d646177ac"
[[package]]
name = "byteorder"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "bytes"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
[[package]]
name = "calloop"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c"
dependencies = [
"log",
"nix",
]
[[package]]
name = "cc"
version = "1.0.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40"
dependencies = [
"jobserver",
]
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
dependencies = [
"libc",
"num-integer",
"num-traits",
"time",
"winapi 0.3.9",
]
[[package]]
name = "clipboard-win"
version = "4.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5123c6b97286809fea9e38d2c9bf530edbcb9fc0d8f8272c28b0c95f067fa92d"
dependencies = [
"error-code",
"str-buf",
"winapi 0.3.9",
]
[[package]]
name = "clipboard_macos"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95"
dependencies = [
"objc",
"objc-foundation",
"objc_id",
]
[[package]]
name = "clipboard_wayland"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61bcb8cde0387fde807b9b7af66ce8bd1665ef736e46e6e47fda82ea003e6ade"
dependencies = [
"smithay-clipboard",
]
[[package]]
name = "clipboard_x11"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "137cbd60c42327a8d63e710cee5a4d6a1ac41cdc90449ea2c2c63bd5e186290a"
dependencies = [
"xcb",
]
[[package]]
name = "cloudabi"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
dependencies = [
"bitflags",
]
[[package]]
name = "cloudabi"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
dependencies = [
"bitflags",
]
[[package]]
name = "cmake"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb"
dependencies = [
"cc",
]
[[package]]
name = "cocoa"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c54201c07dcf3a5ca33fececb8042aed767ee4bfd5a0235a8ceabcda956044b2"
dependencies = [
"bitflags",
"block",
"cocoa-foundation",
"core-foundation 0.9.1",
"core-graphics 0.22.1",
"foreign-types",
"libc",
"objc",
]
[[package]]
name = "cocoa-foundation"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318"
dependencies = [
"bitflags",
"block",
"core-foundation 0.9.1",
"core-graphics-types",
"foreign-types",
"libc",
"objc",
]
[[package]]
name = "color_quant"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]
name = "const_fn"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab"
[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "copyless"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536"
[[package]]
name = "core-foundation"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
dependencies = [
"core-foundation-sys 0.7.0",
"libc",
]
[[package]]
name = "core-foundation"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
dependencies = [
"core-foundation-sys 0.8.2",
"libc",
]
[[package]]
name = "core-foundation-sys"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
[[package]]
name = "core-foundation-sys"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b"
[[package]]
name = "core-graphics"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923"
dependencies = [
"bitflags",
"core-foundation 0.7.0",
"foreign-types",
"libc",
]
[[package]]
name = "core-graphics"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc239bba52bab96649441699533a68de294a101533b0270b2d65aa402b29a7f9"
dependencies = [
"bitflags",
"core-foundation 0.9.1",
"core-graphics-types",
"foreign-types",
"libc",
]
[[package]]
name = "core-graphics-types"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
dependencies = [
"bitflags",
"core-foundation 0.9.1",
"foreign-types",
"libc",
]
[[package]]
name = "core-text"
version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "131b3fd1f8bd5db9f2b398fa4fdb6008c64afc04d447c306ac2c7e98fba2a61d"
dependencies = [
"core-foundation 0.7.0",
"core-graphics 0.19.2",
"foreign-types",
"libc",
]
[[package]]
name = "core-video-sys"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828"
dependencies = [
"cfg-if 0.1.10",
"core-foundation-sys 0.7.0",
"core-graphics 0.19.2",
"libc",
"objc",
]
[[package]]
name = "crc32fast"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "crossbeam-channel"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils 0.8.0",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-epoch",
"crossbeam-utils 0.8.0",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0f606a85340376eef0d6d8fec399e6d4a544d648386c6645eb6d0653b27d9f"
dependencies = [
"cfg-if 1.0.0",
"const_fn",
"crossbeam-utils 0.8.0",
"lazy_static",
"memoffset",
"scopeguard",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
dependencies = [
"autocfg",
"cfg-if 0.1.10",
"lazy_static",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec91540d98355f690a86367e566ecad2e9e579f230230eb7c21398372be73ea5"
dependencies = [
"autocfg",
"cfg-if 1.0.0",
"const_fn",
"lazy_static",
]
[[package]]
name = "d3d12"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a60cceb22c7c53035f8980524fdc7f17cf49681a3c154e6757d30afbec6ec4"
dependencies = [
"bitflags",
"libloading",
"winapi 0.3.9",
]
[[package]]
name = "darling"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858"
dependencies = [
"darling_core",
"darling_macro",
]
[[package]]
name = "darling_core"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn",
]
[[package]]
name = "darling_macro"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72"
dependencies = [
"darling_core",
"quote",
"syn",
]
[[package]]
name = "deflate"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174"
dependencies = [
"adler32",
"byteorder",
]
[[package]]
name = "derivative"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "dirs"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
dependencies = [
"cfg-if 0.1.10",
"dirs-sys",
]
[[package]]
name = "dirs-sys"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
dependencies = [
"libc",
"redox_users",
"winapi 0.3.9",
]
[[package]]
name = "dispatch"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
[[package]]
name = "dlib"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76"
dependencies = [
"libloading",
]
[[package]]
name = "dodrio"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7593dfc68e57dc1d058ada0f151ba07f4b05183c4da4c4df8ff651a81ef0fab"
dependencies = [
"bumpalo 2.6.0",
"cfg-if 0.1.10",
"fxhash",
"js-sys",
"longest-increasing-subsequence",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
]
[[package]]
name = "downcast-rs"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]]
name = "dwrote"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcdf488e3a52a7aa30a05732a3e58420e22acb4b2b75635a561fc6ffbcab59ef"
dependencies = [
"lazy_static",
"libc",
"winapi 0.3.9",
"wio",
]
[[package]]
name = "either"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "error-code"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b49c94f66f2d2c5ee8685039e458b4e6c9f13af7c28736baf10ce42966a5ab52"
dependencies = [
"libc",
"str-buf",
]
[[package]]
name = "euclid"
version = "0.20.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad"
dependencies = [
"num-traits",
]
[[package]]
name = "expat-sys"
version = "2.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa"
dependencies = [
"cmake",
"pkg-config",
]
[[package]]
name = "float-ord"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e"
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "font-kit"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f953474ebbe3460775ed2da52435477cc029493284d6ceb635598586a2c6298"
dependencies = [
"bitflags",
"byteorder",
"core-foundation 0.7.0",
"core-graphics 0.19.2",
"core-text",
"dirs",
"dwrote",
"float-ord",
"freetype",
"lazy_static",
"libc",
"log",
"pathfinder_geometry",
"pathfinder_simd",
"servo-fontconfig",
"walkdir",
"winapi 0.3.9",
]
[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
"foreign-types-shared",
]
[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00"
dependencies = [
"matches",
"percent-encoding",
]
[[package]]
name = "freetype"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11926b2b410b469d0e9399eca4cbbe237a9ef02176c485803b29216307e8e028"
dependencies = [
"libc",
"servo-freetype-sys",
]
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
dependencies = [
"bitflags",
"fuchsia-zircon-sys",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
name = "futures"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95314d38584ffbfda215621d723e0a3906f032e03ae5551e650058dac83d4797"
dependencies = [
"futures-channel",
"futures-core",
"futures-executor",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0448174b01148032eed37ac4aed28963aaaa8cfa93569a08e5b479bbc6c2c151"
dependencies = [
"futures-core",
"futures-sink",
]
[[package]]
name = "futures-core"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18eaa56102984bed2c88ea39026cff3ce3b4c7f508ca970cedf2450ea10d4e46"
[[package]]
name = "futures-executor"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5f8e0c9258abaea85e78ebdda17ef9666d390e987f006be6080dfe354b708cb"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
"num_cpus",
]
[[package]]
name = "futures-io"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e1798854a4727ff944a7b12aa999f58ce7aa81db80d2dfaaf2ba06f065ddd2b"
[[package]]
name = "futures-macro"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e36fccf3fc58563b4a14d265027c627c3b665d7fed489427e88e7cc929559efe"
dependencies = [
"proc-macro-hack",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "futures-sink"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e3ca3f17d6e8804ae5d3df7a7d35b2b3a6fe89dac84b31872720fc3060a0b11"
[[package]]
name = "futures-task"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d502af37186c4fef99453df03e374683f8a1eec9dcc1e66b3b82dc8278ce3c"
dependencies = [
"once_cell",
]
[[package]]
name = "futures-util"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abcb44342f62e6f3e8ac427b8aa815f724fd705dfad060b18ac7866c15bb8e34"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
"pin-project 1.0.1",
"pin-utils",
"proc-macro-hack",
"proc-macro-nested",
"slab",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "getrandom"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
dependencies = [
"cfg-if 0.1.10",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]]
name = "gfx-auxil"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07cd956b592970f08545b9325b87580eb95a51843b6f39da27b8667fec1a1216"
dependencies = [
"fxhash",
"gfx-hal",
"spirv_cross",
]
[[package]]
name = "gfx-backend-dx11"
version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52b0c3b8b2e0a60c1380a7c27652cd86b791e5d8312fb9592a7a59bd437e9532"
dependencies = [
"arrayvec",
"bitflags",
"gfx-auxil",
"gfx-hal",
"libloading",
"log",
"parking_lot 0.11.0",
"range-alloc",
"raw-window-handle",
"smallvec",
"spirv_cross",
"thunderdome",
"winapi 0.3.9",
"wio",
]
[[package]]
name = "gfx-backend-dx12"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "375014deed24d76b03604736dd899f0925158a1a96db90cbefb9cce070f71af7"
dependencies = [
"arrayvec",
"bit-set",
"bitflags",
"d3d12",
"gfx-auxil",
"gfx-hal",
"log",
"range-alloc",
"raw-window-handle",
"smallvec",
"spirv_cross",
"winapi 0.3.9",
]
[[package]]
name = "gfx-backend-empty"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2085227c12b78f6657a900c829f2d0deb46a9be3eaf86844fde263cdc218f77c"
dependencies = [
"gfx-hal",
"log",
"raw-window-handle",
]
[[package]]
name = "gfx-backend-metal"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60ba1c77c112e7d35786dbd49ed26f2a76ce53a44bc09fe964935e4e35ed7f2b"
dependencies = [
"arrayvec",
"bitflags",
"block",
"cocoa-foundation",
"copyless",
"foreign-types",
"gfx-auxil",
"gfx-hal",
"lazy_static",
"log",
"metal",
"objc",
"parking_lot 0.11.0",
"range-alloc",
"raw-window-handle",
"smallvec",
"spirv_cross",
"storage-map",
]
[[package]]
name = "gfx-backend-vulkan"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a3a63cf61067a09b7d1ac480af3cb2ae0c5ede5bed294607bbd814cb1666c45"
dependencies = [
"arrayvec",
"ash",
"byteorder",
"core-graphics-types",
"gfx-hal",
"inplace_it",
"lazy_static",
"log",
"objc",
"raw-window-handle",
"smallvec",
"winapi 0.3.9",
"x11",
]
[[package]]
name = "gfx-descriptor"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd8c7afcd000f279d541a490e27117e61037537279b9342279abf4938fe60c6b"
dependencies = [
"arrayvec",
"fxhash",
"gfx-hal",
"log",
]
[[package]]
name = "gfx-hal"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18d0754f5b7a43915fd7466883b2d1bb0800d7cc4609178d0b27bf143b9e5123"
dependencies = [
"bitflags",
"raw-window-handle",
]
[[package]]
name = "gfx-memory"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dccdda5d2b39412f4ca2cb15c70b5a82783a86b0606f5e985342754c8ed88f05"
dependencies = [
"bit-set",
"fxhash",
"gfx-hal",
"log",
"slab",
]
[[package]]
name = "gif"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02efba560f227847cb41463a7395c514d127d4f74fff12ef0137fff1b84b96c4"
dependencies = [
"color_quant",
"weezl",
]
[[package]]
name = "glam"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8637c7ec4fd0776c51eeab3e0d5d1aa7e440ece3fc2ee7d674e13c957287bfc1"
[[package]]
name = "glyph_brush"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afd3e2cfd503a5218dd56172a8bf7c8655a4a7cf745737c606a6edfeea1b343f"
dependencies = [
"glyph_brush_draw_cache",
"glyph_brush_layout",
"log",
"ordered-float",
"rustc-hash",
"twox-hash",
]
[[package]]
name = "glyph_brush_draw_cache"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cef969a091be5565c2c10b31fd2f115cbeed9f783a27c96ae240ff8ceee067c"
dependencies = [
"ab_glyph",
"crossbeam-channel",
"crossbeam-deque",
"linked-hash-map",
"rayon",
"rustc-hash",
]
[[package]]
name = "glyph_brush_layout"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10bc06d530bf20c1902f1b02799ab7372ff43f6119770c49b0bc3f21bd148820"
dependencies = [
"ab_glyph",
"approx",
"xi-unicode",
]
[[package]]
name = "guillotiere"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47065d052e2f000066c4ffbea7051e55bff5c1532c400fc1e269492b2474ccc1"
dependencies = [
"euclid",
"svg_fmt",
]
[[package]]
name = "h2"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535"
dependencies = [
"bytes",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
"indexmap",
"slab",
"tokio",
"tokio-util",
"tracing",
"tracing-futures",
]
[[package]]
name = "hashbrown"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
[[package]]
name = "heck"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "hermit-abi"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
dependencies = [
"libc",
]
[[package]]
name = "http"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9"
dependencies = [
"bytes",
"fnv",
"itoa",
]
[[package]]
name = "http-body"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
dependencies = [
"bytes",
"http",
]
[[package]]
name = "httparse"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
[[package]]
name = "httpdate"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
[[package]]
name = "hyper"
version = "0.13.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf"
dependencies = [
"bytes",
"futures-channel",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"httparse",
"httpdate",
"itoa",
"pin-project 1.0.1",
"socket2",
"tokio",
"tower-service",
"tracing",
"want",
]
[[package]]
name = "hyper-tls"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
dependencies = [
"bytes",
"hyper",
"native-tls",
"tokio",
"tokio-tls",
]
[[package]]
name = "iced"
version = "0.1.1"
dependencies = [
"iced_core",
"iced_futures",
"iced_web",
"iced_wgpu",
"iced_winit",
"thiserror",
]
[[package]]
name = "iced_core"
version = "0.2.1"
[[package]]
name = "iced_futures"
version = "0.1.2"
dependencies = [
"futures",
"log",
"tokio",
"wasm-bindgen-futures",
]
[[package]]
name = "iced_graphics"
version = "0.1.0"
dependencies = [
"bytemuck",
"font-kit",
"glam",
"iced_native",
"iced_style",
"raw-window-handle",
"thiserror",
]
[[package]]
name = "iced_native"
version = "0.2.2"
dependencies = [
"iced_core",
"iced_futures",
"num-traits",
"twox-hash",
"unicode-segmentation",
]
[[package]]
name = "iced_style"
version = "0.1.0"
dependencies = [
"iced_core",
]
[[package]]
name = "iced_web"
version = "0.2.1"
dependencies = [
"dodrio",
"iced_core",
"iced_futures",
"iced_style",
"num-traits",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
]
[[package]]
name = "iced_wgpu"
version = "0.2.2"
dependencies = [
"bytemuck",
"futures",
"glyph_brush",
"guillotiere",
"iced_graphics",
"iced_native",
"image",
"log",
"raw-window-handle",
"wgpu",
"wgpu_glyph",
"zerocopy",
]
[[package]]
name = "iced_winit"
version = "0.1.1"
dependencies = [
"iced_futures",
"iced_graphics",
"iced_native",
"log",
"thiserror",
"winapi 0.3.9",
"window_clipboard",
"winit",
]
[[package]]
name = "icy_matrix"
version = "0.1.0"
dependencies = [
"assign",
"chrono",
"iced",
"iced_futures",
"iced_native",
"indexmap",
"log",
"open",
"ruma",
"ruma-client",
"serde",
"simplelog",
"tokio",
"toml",
"uuid",
]
[[package]]
name = "ident_case"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
dependencies = [
"matches",
"unicode-bidi",
"unicode-normalization",
]
[[package]]
name = "image"
version = "0.23.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4f0a8345b33b082aedec2f4d7d4a926b845cee184cbe78b703413066564431b"
dependencies = [
"bytemuck",
"byteorder",
"color_quant",
"gif",
"jpeg-decoder",
"num-iter",
"num-rational",
"num-traits",
"png",
"scoped_threadpool",
"tiff",
]
[[package]]
name = "indexmap"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "inplace_it"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd01a2a73f2f399df96b22dc88ea687ef4d76226284e7531ae3c7ee1dc5cb534"
[[package]]
name = "instant"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb1fc4429a33e1f80d41dc9fea4d108a88bec1de8053878898ae448a0b52f613"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "iovec"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
dependencies = [
"libc",
]
[[package]]
name = "itoa"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
[[package]]
name = "jni-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "jobserver"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
dependencies = [
"libc",
]
[[package]]
name = "jpeg-decoder"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc797adac5f083b8ff0ca6f6294a999393d76e197c36488e2ef732c4715f6fa3"
dependencies = [
"byteorder",
"rayon",
]
[[package]]
name = "js-sys"
version = "0.3.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "js_int"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b96797f53235a1d6dc985f244a69de54b04c45b7e0e357a35c85a45a847d92f2"
dependencies = [
"serde",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
dependencies = [
"winapi 0.2.8",
"winapi-build",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
version = "0.2.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
[[package]]
name = "libloading"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1090080fe06ec2648d0da3881d9453d97e71a45f00eb179af7fdd7e3f686fdb0"
dependencies = [
"cfg-if 1.0.0",
"winapi 0.3.9",
]
[[package]]
name = "linked-hash-map"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"
[[package]]
name = "lock_api"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
dependencies = [
"scopeguard",
]
[[package]]
name = "lock_api"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c"
dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
dependencies = [
"cfg-if 0.1.10",
]
[[package]]
name = "longest-increasing-subsequence"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86"
[[package]]
name = "malloc_buf"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
dependencies = [
"libc",
]
[[package]]
name = "maplit"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
[[package]]
name = "matches"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]]
name = "maybe-uninit"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "memchr"
version = "2.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
[[package]]
name = "memmap"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]]
name = "memoffset"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa"
dependencies = [
"autocfg",
]
[[package]]
name = "metal"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c4e8a431536529327e28c9ba6992f2cb0c15d4222f0602a16e6d7695ff3bccf"
dependencies = [
"bitflags",
"block",
"cocoa-foundation",
"foreign-types",
"log",
"objc",
]
[[package]]
name = "miniz_oxide"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435"
dependencies = [
"adler32",
]
[[package]]
name = "miniz_oxide"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
dependencies = [
"adler",
"autocfg",
]
[[package]]
name = "mio"
version = "0.6.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"
dependencies = [
"cfg-if 0.1.10",
"fuchsia-zircon",
"fuchsia-zircon-sys",
"iovec",
"kernel32-sys",
"libc",
"log",
"miow",
"net2",
"slab",
"winapi 0.2.8",
]
[[package]]
name = "mio-extras"
version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
dependencies = [
"lazycell",
"log",
"mio",
"slab",
]
[[package]]
name = "miow"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
dependencies = [
"kernel32-sys",
"net2",
"winapi 0.2.8",
"ws2_32-sys",
]
[[package]]
name = "naga"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0873deb76cf44b7454fba7b2ba6a89d3de70c08aceffd2c489379b3d9d08e661"
dependencies = [
"bitflags",
"fxhash",
"log",
"num-traits",
"spirv_headers",
"thiserror",
]
[[package]]
name = "native-tls"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a1cda389c26d6b88f3d2dc38aa1b750fe87d298cc5d795ec9e975f402f00372"
dependencies = [
"lazy_static",
"libc",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework",
"security-framework-sys",
"tempfile",
]
[[package]]
name = "ndk"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73"
dependencies = [
"jni-sys",
"ndk-sys",
"num_enum",
"thiserror",
]
[[package]]
name = "ndk-glue"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241"
dependencies = [
"lazy_static",
"libc",
"log",
"ndk",
"ndk-macro",
"ndk-sys",
]
[[package]]
name = "ndk-macro"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d"
dependencies = [
"darling",
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "ndk-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d"
[[package]]
name = "net2"
version = "0.2.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853"
dependencies = [
"cfg-if 0.1.10",
"libc",
"winapi 0.3.9",
]
[[package]]
name = "nix"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055"
dependencies = [
"bitflags",
"cc",
"cfg-if 0.1.10",
"libc",
]
[[package]]
name = "nom"
version = "5.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af"
dependencies = [
"memchr",
"version_check",
]
[[package]]
name = "num-integer"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
dependencies = [
"autocfg",
"num-traits",
]
[[package]]
name = "num-iter"
version = "0.1.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
dependencies = [
"autocfg",
]
[[package]]
name = "num_cpus"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
dependencies = [
"hermit-abi",
"libc",
]
[[package]]
name = "num_enum"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4"
dependencies = [
"derivative",
"num_enum_derive",
]
[[package]]
name = "num_enum_derive"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "objc"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
dependencies = [
"malloc_buf",
"objc_exception",
]
[[package]]
name = "objc-foundation"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
dependencies = [
"block",
"objc",
"objc_id",
]
[[package]]
name = "objc_exception"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"
dependencies = [
"cc",
]
[[package]]
name = "objc_id"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
dependencies = [
"objc",
]
[[package]]
name = "once_cell"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad"
[[package]]
name = "open"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c283bf0114efea9e42f1a60edea9859e8c47528eae09d01df4b29c1e489cc48"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "openssl"
version = "0.10.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4"
dependencies = [
"bitflags",
"cfg-if 0.1.10",
"foreign-types",
"lazy_static",
"libc",
"openssl-sys",
]
[[package]]
name = "openssl-probe"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
[[package]]
name = "openssl-sys"
version = "0.9.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"
dependencies = [
"autocfg",
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "ordered-float"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3741934be594d77de1c8461ebcbbe866f585ea616a9753aa78f2bdc69f0e4579"
dependencies = [
"num-traits",
]
[[package]]
name = "owned_ttf_parser"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3"
dependencies = [
"ttf-parser 0.6.2",
]
[[package]]
name = "owned_ttf_parser"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb477c7fd2a3a6e04e1dc6ca2e4e9b04f2df702021dc5a5d1cf078c587dc59f7"
dependencies = [
"ttf-parser 0.8.2",
]
[[package]]
name = "parking_lot"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
dependencies = [
"lock_api 0.3.4",
"parking_lot_core 0.7.2",
]
[[package]]
name = "parking_lot"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733"
dependencies = [
"instant",
"lock_api 0.4.1",
"parking_lot_core 0.8.0",
]
[[package]]
name = "parking_lot_core"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
dependencies = [
"cfg-if 0.1.10",
"cloudabi 0.0.3",
"libc",
"redox_syscall",
"smallvec",
"winapi 0.3.9",
]
[[package]]
name = "parking_lot_core"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b"
dependencies = [
"cfg-if 0.1.10",
"cloudabi 0.1.0",
"instant",
"libc",
"redox_syscall",
"smallvec",
"winapi 0.3.9",
]
[[package]]
name = "pathfinder_geometry"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3"
dependencies = [
"log",
"pathfinder_simd",
]
[[package]]
name = "pathfinder_simd"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b451513912d6b3440e443aa75a73ab22203afedc4a90df8526d008c0f86f7cb3"
dependencies = [
"rustc_version",
]
[[package]]
name = "percent-encoding"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
[[package]]
name = "pin-project"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15"
dependencies = [
"pin-project-internal 0.4.27",
]
[[package]]
name = "pin-project"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841"
dependencies = [
"pin-project-internal 1.0.1",
]
[[package]]
name = "pin-project-internal"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "pin-project-internal"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "pin-project-lite"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b"
[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
[[package]]
name = "png"
version = "0.16.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfe7f9f1c730833200b134370e1d5098964231af8450bce9b78ee3ab5278b970"
dependencies = [
"bitflags",
"crc32fast",
"deflate",
"miniz_oxide 0.3.7",
]
[[package]]
name = "ppv-lite86"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
[[package]]
name = "proc-macro-crate"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
dependencies = [
"toml",
]
[[package]]
name = "proc-macro-hack"
version = "0.5.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
[[package]]
name = "proc-macro-nested"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a"
[[package]]
name = "proc-macro2"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
dependencies = [
"unicode-xid",
]
[[package]]
name = "quote"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom",
"libc",
"rand_chacha",
"rand_core",
"rand_hc",
]
[[package]]
name = "rand_chacha"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
"getrandom",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
dependencies = [
"rand_core",
]
[[package]]
name = "range-alloc"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a871f1e45a3a3f0c73fb60343c811238bb5143a81642e27c2ac7aac27ff01a63"
[[package]]
name = "raw-window-handle"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211"
dependencies = [
"libc",
]
[[package]]
name = "rayon"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
dependencies = [
"autocfg",
"crossbeam-deque",
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
"crossbeam-utils 0.8.0",
"lazy_static",
"num_cpus",
]
[[package]]
name = "redox_syscall"
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
[[package]]
name = "redox_users"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
dependencies = [
"getrandom",
"redox_syscall",
"rust-argon2",
]
[[package]]
name = "remove_dir_all"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "ruma"
version = "0.0.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"assign",
"js_int",
"ruma-api",
"ruma-client-api",
"ruma-common",
"ruma-events",
"ruma-identifiers",
"ruma-serde",
]
[[package]]
name = "ruma-api"
version = "0.17.0-alpha.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"http",
"percent-encoding",
"ruma-api-macros",
"ruma-common",
"ruma-identifiers",
"ruma-serde",
"serde",
"serde_json",
"thiserror",
]
[[package]]
name = "ruma-api-macros"
version = "0.17.0-alpha.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "ruma-client"
version = "0.4.0"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"assign",
"futures-core",
"futures-util",
"http",
"hyper",
"hyper-tls",
"ruma-api",
"ruma-client-api",
"ruma-common",
"ruma-events",
"ruma-identifiers",
"ruma-serde",
"serde",
"serde_json",
]
[[package]]
name = "ruma-client-api"
version = "0.10.0-alpha.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"assign",
"http",
"js_int",
"maplit",
"percent-encoding",
"ruma-api",
"ruma-common",
"ruma-events",
"ruma-identifiers",
"ruma-serde",
"serde",
"serde_json",
]
[[package]]
name = "ruma-common"
version = "0.2.0"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"js_int",
"ruma-common-macros",
"ruma-identifiers",
"ruma-serde",
"serde",
"serde_json",
]
[[package]]
name = "ruma-common-macros"
version = "0.2.0"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "ruma-events"
version = "0.22.0-alpha.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"js_int",
"ruma-common",
"ruma-events-macros",
"ruma-identifiers",
"ruma-serde",
"serde",
"serde_json",
]
[[package]]
name = "ruma-events-macros"
version = "0.22.0-alpha.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "ruma-identifiers"
version = "0.17.4"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"ruma-common-macros",
"ruma-identifiers-macros",
"ruma-identifiers-validation",
"ruma-serde",
"serde",
]
[[package]]
name = "ruma-identifiers-macros"
version = "0.17.4"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"proc-macro2",
"quote",
"ruma-identifiers-validation",
"syn",
]
[[package]]
name = "ruma-identifiers-validation"
version = "0.1.1"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"serde",
"strum",
]
[[package]]
name = "ruma-serde"
version = "0.2.3"
source = "git+https://github.com/ruma/ruma/?branch=main#8f710a371b7e719f72b224b06c683908ee627f1f"
dependencies = [
"form_urlencoded",
"itoa",
"js_int",
"serde",
"serde_json",
]
[[package]]
name = "rust-argon2"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19"
dependencies = [
"base64",
"blake2b_simd",
"constant_time_eq",
"crossbeam-utils 0.7.2",
]
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc_version"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
dependencies = [
"semver",
]
[[package]]
name = "rusttype"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59"
dependencies = [
"ab_glyph_rasterizer",
"owned_ttf_parser 0.6.0",
]
[[package]]
name = "ryu"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "schannel"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
dependencies = [
"lazy_static",
"winapi 0.3.9",
]
[[package]]
name = "scoped-tls"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
[[package]]
name = "scoped_threadpool"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
[[package]]
name = "scopeguard"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "security-framework"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69"
dependencies = [
"bitflags",
"core-foundation 0.9.1",
"core-foundation-sys 0.8.2",
"libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b"
dependencies = [
"core-foundation-sys 0.8.2",
"libc",
]
[[package]]
name = "semver"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
dependencies = [
"semver-parser",
]
[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]]
name = "serde"
version = "1.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95"
dependencies = [
"itoa",
"ryu",
"serde",
]
[[package]]
name = "servo-fontconfig"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a088f8d775a5c5314aae09bd77340bc9c67d72b9a45258be34c83548b4814cd9"
dependencies = [
"libc",
"servo-fontconfig-sys",
]
[[package]]
name = "servo-fontconfig-sys"
version = "4.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b3e166450f523f4db06c14f02a2d39e76d49b5d8cbd224338d93e3595c156c"
dependencies = [
"expat-sys",
"pkg-config",
"servo-freetype-sys",
]
[[package]]
name = "servo-freetype-sys"
version = "4.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c4ccb6d0d32d277d3ef7dea86203d8210945eb7a45fba89dd445b3595dd0dfc"
dependencies = [
"cmake",
"pkg-config",
]
[[package]]
name = "simplelog"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b2736f58087298a448859961d3f4a0850b832e72619d75adc69da7993c2cd3c"
dependencies = [
"chrono",
"log",
"termcolor",
]
[[package]]
name = "slab"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
[[package]]
name = "smallvec"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"
[[package]]
name = "smithay-client-toolkit"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ec5c077def8af49f9b5aeeb5fcf8079c638c6615c3a8f9305e2dea601de57f7"
dependencies = [
"andrew",
"bitflags",
"byteorder",
"calloop",
"dlib",
"lazy_static",
"log",
"memmap",
"nix",
"wayland-client",
"wayland-cursor",
"wayland-protocols",
]
[[package]]
name = "smithay-clipboard"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e0eec3480d929e276b38424c8849575ee1e50003eae1cbdc93ee653147acc42"
dependencies = [
"smithay-client-toolkit",
"wayland-client",
]
[[package]]
name = "socket2"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44"
dependencies = [
"cfg-if 0.1.10",
"libc",
"redox_syscall",
"winapi 0.3.9",
]
[[package]]
name = "spirv_cross"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8221f4aebf53a4447aebd4fe29ebff2c66dd2c2821e63675e09e85bd21c8633"
dependencies = [
"cc",
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "spirv_headers"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f5b132530b1ac069df335577e3581765995cba5a13995cdbbdbc8fb057c532c"
dependencies = [
"bitflags",
"num-traits",
]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "storage-map"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "418bb14643aa55a7841d5303f72cf512cfb323b8cc221d51580500a1ca75206c"
dependencies = [
"lock_api 0.4.1",
]
[[package]]
name = "str-buf"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a"
[[package]]
name = "strsim"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]]
name = "strum"
version = "0.19.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b89a286a7e3b5720b9a477b23253bc50debac207c8d21505f8e70b36792f11b5"
dependencies = [
"strum_macros",
]
[[package]]
name = "strum_macros"
version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e61bb0be289045cb80bfce000512e32d09f8337e54c186725da381377ad1f8d5"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "svg_fmt"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fb1df15f412ee2e9dfc1c504260fa695c1c3f10fe9f4a6ee2d2184d7d6450e2"
[[package]]
name = "syn"
version = "1.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc371affeffc477f42a221a1e4297aedcea33d47d19b61455588bd9d8f6b19ac"
dependencies = [
"proc-macro2",
"quote",
"unicode-xid",
]
[[package]]
name = "synstructure"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
dependencies = [
"proc-macro2",
"quote",
"syn",
"unicode-xid",
]
[[package]]
name = "tempfile"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
dependencies = [
"cfg-if 0.1.10",
"libc",
"rand",
"redox_syscall",
"remove_dir_all",
"winapi 0.3.9",
]
[[package]]
name = "termcolor"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
dependencies = [
"winapi-util",
]
[[package]]
name = "thiserror"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e9ae34b84616eedaaf1e9dd6026dbe00dcafa92aa0c8077cb69df1fcfe5e53e"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ba20f23e85b10754cd195504aebf6a27e2e6cbe28c17778a0c930724628dd56"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "thunderdome"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7572415bd688d401c52f6e36f4c8e805b9ae1622619303b9fa835d531db0acae"
[[package]]
name = "tiff"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abeb4e3f32a8973722c0254189e6890358e72b1bf11becb287ee0b23c595a41d"
dependencies = [
"jpeg-decoder",
"miniz_oxide 0.4.3",
"weezl",
]
[[package]]
name = "time"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi 0.3.9",
]
[[package]]
name = "tinyvec"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117"
[[package]]
name = "tokio"
version = "0.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd"
dependencies = [
"bytes",
"fnv",
"futures-core",
"iovec",
"lazy_static",
"memchr",
"mio",
"num_cpus",
"parking_lot 0.10.2",
"pin-project-lite",
"slab",
]
[[package]]
name = "tokio-tls"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343"
dependencies = [
"native-tls",
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
"log",
"pin-project-lite",
"tokio",
]
[[package]]
name = "toml"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645"
dependencies = [
"serde",
]
[[package]]
name = "tower-service"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
[[package]]
name = "tracing"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27"
dependencies = [
"cfg-if 0.1.10",
"log",
"pin-project-lite",
"tracing-core",
]
[[package]]
name = "tracing-core"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
dependencies = [
"lazy_static",
]
[[package]]
name = "tracing-futures"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c"
dependencies = [
"pin-project 0.4.27",
"tracing",
]
[[package]]
name = "try-lock"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "ttf-parser"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc"
[[package]]
name = "ttf-parser"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d973cfa0e6124166b50a1105a67c85de40bbc625082f35c0f56f84cb1fb0a827"
[[package]]
name = "twox-hash"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
dependencies = [
"cfg-if 0.1.10",
"rand",
"static_assertions",
]
[[package]]
name = "typed-arena"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae"
[[package]]
name = "unicode-bidi"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
dependencies = [
"matches",
]
[[package]]
name = "unicode-normalization"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977"
dependencies = [
"tinyvec",
]
[[package]]
name = "unicode-segmentation"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
[[package]]
name = "unicode-xid"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
[[package]]
name = "url"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e"
dependencies = [
"form_urlencoded",
"idna",
"matches",
"percent-encoding",
]
[[package]]
name = "uuid"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
dependencies = [
"rand",
]
[[package]]
name = "vcpkg"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
[[package]]
name = "version_check"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
[[package]]
name = "walkdir"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
dependencies = [
"same-file",
"winapi 0.3.9",
"winapi-util",
]
[[package]]
name = "want"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
dependencies = [
"log",
"try-lock",
]
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasm-bindgen"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42"
dependencies = [
"cfg-if 0.1.10",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68"
dependencies = [
"bumpalo 3.4.0",
"lazy_static",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da"
dependencies = [
"cfg-if 0.1.10",
"js-sys",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307"
[[package]]
name = "wayland-client"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80c54f9b90b2c044784f91fe22c5619a8a9c681db38492f2fd78ff968cf3f184"
dependencies = [
"bitflags",
"downcast-rs",
"libc",
"nix",
"scoped-tls",
"wayland-commons",
"wayland-scanner",
"wayland-sys",
]
[[package]]
name = "wayland-commons"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7602d75560fe6f02cac723609cce658042fe60541b5107999818d29d4dab7cfa"
dependencies = [
"nix",
"once_cell",
"smallvec",
"wayland-sys",
]
[[package]]
name = "wayland-cursor"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0446b959c5b5b4b2c11f63112fc7cbeb50ecd9f2c340d2b0ea632875685baf04"
dependencies = [
"nix",
"wayland-client",
"xcursor",
]
[[package]]
name = "wayland-protocols"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d419585bbdb150fb541579cff205c6095a86cd874530e41838d1f18a9569a08"
dependencies = [
"bitflags",
"wayland-client",
"wayland-commons",
"wayland-scanner",
]
[[package]]
name = "wayland-scanner"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1cc091af4b05a435312f7cefe3a26824d2017966a58362ca913f72c3d68e5e2"
dependencies = [
"proc-macro2",
"quote",
"xml-rs",
]
[[package]]
name = "wayland-sys"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5640f53d1fe6eaaa2e77b9ff015fe9a556173ce8388607f941aecfd9b05c73e"
dependencies = [
"dlib",
"lazy_static",
"pkg-config",
]
[[package]]
name = "web-sys"
version = "0.3.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "weezl"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8795d6e0e17485803cc10ef126bb8c0d59b7c61b219d66cfe0b3216dd0e8580a"
[[package]]
name = "wgpu"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "549160f188eef412ac978499ddf0ceadad4c9159bb1160f9e6b9d4cc8ee977dc"
dependencies = [
"arrayvec",
"futures",
"gfx-backend-vulkan",
"js-sys",
"objc",
"parking_lot 0.11.0",
"raw-window-handle",
"smallvec",
"tracing",
"typed-arena",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"wgpu-core",
"wgpu-types",
]
[[package]]
name = "wgpu-core"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea487deeae90e06d77eb8e6cef945247774e7c0a0a226d238b31e90633594365"
dependencies = [
"arrayvec",
"bitflags",
"copyless",
"fxhash",
"gfx-backend-dx11",
"gfx-backend-dx12",
"gfx-backend-empty",
"gfx-backend-metal",
"gfx-backend-vulkan",
"gfx-descriptor",
"gfx-hal",
"gfx-memory",
"naga",
"parking_lot 0.11.0",
"raw-window-handle",
"smallvec",
"thiserror",
"tracing",
"wgpu-types",
]
[[package]]
name = "wgpu-types"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e3529528e608b54838ee618c3923b0f46e6db0334cfc6c42a16cf4ceb3bdb57"
dependencies = [
"bitflags",
]
[[package]]
name = "wgpu_glyph"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27812a263e1298d3330795af62faf5daf5852beb632794acf93e4494234fc9f4"
dependencies = [
"glyph_brush",
"log",
"wgpu",
"zerocopy",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "window_clipboard"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b0c36ef18b54a244597c90574045c7f2b1dd3027e63287631879cac82e2284a"
dependencies = [
"clipboard-win",
"clipboard_macos",
"clipboard_wayland",
"clipboard_x11",
"raw-window-handle",
]
[[package]]
name = "winit"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5bc559da567d8aa671bbcd08304d49e982c7bf2cb91e10288b9188931c1b772"
dependencies = [
"bitflags",
"cocoa",
"core-foundation 0.9.1",
"core-graphics 0.22.1",
"core-video-sys",
"dispatch",
"instant",
"lazy_static",
"libc",
"log",
"mio",
"mio-extras",
"ndk",
"ndk-glue",
"ndk-sys",
"objc",
"parking_lot 0.11.0",
"percent-encoding",
"raw-window-handle",
"smithay-client-toolkit",
"wayland-client",
"winapi 0.3.9",
"x11-dl",
]
[[package]]
name = "wio"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5"
dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "ws2_32-sys"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
dependencies = [
"winapi 0.2.8",
"winapi-build",
]
[[package]]
name = "x11"
version = "2.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ecd092546cb16f25783a5451538e73afc8d32e242648d54f4ae5459ba1e773"
dependencies = [
"libc",
"pkg-config",
]
[[package]]
name = "x11-dl"
version = "2.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8"
dependencies = [
"lazy_static",
"libc",
"maybe-uninit",
"pkg-config",
]
[[package]]
name = "xcb"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62056f63138b39116f82a540c983cc11f1c90cd70b3d492a70c25eaa50bd22a6"
dependencies = [
"libc",
"log",
]
[[package]]
name = "xcursor"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3a481cfdefd35e1c50073ae33a8000d695c98039544659f5dc5dd71311b0d01"
dependencies = [
"nom",
]
[[package]]
name = "xdg"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57"
[[package]]
name = "xi-unicode"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a"
[[package]]
name = "xml-rs"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a"
[[package]]
name = "zerocopy"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6580539ad917b7c026220c4b3f2c08d52ce54d6ce0dc491e66002e35388fab46"
dependencies = [
"byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d498dbd1fd7beb83c86709ae1c33ca50942889473473d287d56ce4770a18edfb"
dependencies = [
"proc-macro2",
"syn",
"synstructure",
]