repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/saved_tracks/saved_tracks_model.rs | src/app/components/saved_tracks/saved_tracks_model.rs | use gio::prelude::*;
use gio::SimpleActionGroup;
use std::ops::Deref;
use std::rc::Rc;
use crate::app::components::{labels, PlaylistModel};
use crate::app::models::*;
use crate::app::state::SelectionContext;
use crate::app::state::{PlaybackAction, SelectionAction, SelectionState};
use crate::app::{ActionDispatcher, Ap... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/saved_tracks/mod.rs | src/app/components/saved_tracks/mod.rs | #[allow(clippy::module_inception)]
mod saved_tracks;
pub use saved_tracks::*;
mod saved_tracks_model;
pub use saved_tracks_model::*;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/user_menu/user_menu_model.rs | src/app/components/user_menu/user_menu_model.rs | use crate::api::clear_user_cache;
use crate::app::credentials::Credentials;
use crate::app::state::{LoginAction, PlaybackAction};
use crate::app::{ActionDispatcher, AppModel};
use std::ops::Deref;
use std::rc::Rc;
pub struct UserMenuModel {
app_model: Rc<AppModel>,
dispatcher: Box<dyn ActionDispatcher>,
}
imp... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/user_menu/user_menu.rs | src/app/components/user_menu/user_menu.rs | use gettextrs::*;
use gio::{prelude::ActionMapExt, SimpleAction, SimpleActionGroup};
use gtk::prelude::*;
use libadwaita::prelude::AdwDialogExt;
use std::rc::Rc;
use super::UserMenuModel;
use crate::app::components::{EventListener, Settings};
use crate::app::{state::LoginEvent, AppEvent};
pub struct UserMenu {
us... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/user_menu/mod.rs | src/app/components/user_menu/mod.rs | #[allow(clippy::module_inception)]
mod user_menu;
pub use user_menu::*;
mod user_menu_model;
pub use user_menu_model::*;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/scrolling_header/mod.rs | src/app/components/scrolling_header/mod.rs | mod scrolling_header_widget;
use gtk::prelude::StaticType;
pub use scrolling_header_widget::*;
pub fn expose_widgets() {
scrolling_header_widget::ScrollingHeaderWidget::static_type();
}
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/scrolling_header/scrolling_header_widget.rs | src/app/components/scrolling_header/scrolling_header_widget.rs | use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::CompositeTemplate;
mod imp {
use super::*;
#[derive(Debug, Default, CompositeTemplate)]
#[template(resource = "/dev/diegovsky/Riff/components/scrolling_header.ui")]
pub struct ScrollingHeaderWidget {
#[template_child]
pub sc... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/selection/widget.rs | src/app/components/selection/widget.rs | use gio::prelude::ActionMapExt;
use gio::{SimpleAction, SimpleActionGroup};
use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::CompositeTemplate;
use crate::app::components::{display_add_css_provider, labels};
use crate::app::models::PlaylistSummary;
mod imp {
use super::*;
#[derive(Debug, Default... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/selection/mod.rs | src/app/components/selection/mod.rs | mod widget;
mod component;
pub use component::*;
use glib::prelude::*;
pub fn expose_widgets() {
widget::SelectionToolbarWidget::static_type();
}
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/selection/component.rs | src/app/components/selection/component.rs | use gettextrs::gettext;
use gtk::prelude::*;
use std::ops::Deref;
use std::rc::Rc;
use crate::app::components::{Component, EventListener};
use crate::app::models::PlaylistSummary;
use crate::app::state::{
LoginEvent, SelectionAction, SelectionContext, SelectionEvent, SelectionState,
};
use crate::app::{ActionDispa... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/search/search_button.rs | src/app/components/search/search_button.rs | use gtk::prelude::*;
use crate::app::components::EventListener;
use crate::app::{ActionDispatcher, AppAction};
pub struct SearchBarModel(pub Box<dyn ActionDispatcher>);
impl SearchBarModel {
pub fn navigate_to_search(&self) {
self.0.dispatch(AppAction::ViewSearch());
}
}
pub struct SearchButton;
im... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/search/search.rs | src/app/components/search/search.rs | use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::CompositeTemplate;
use std::rc::Rc;
use crate::app::components::utils::{wrap_flowbox_item, Debouncer};
use crate::app::components::{AlbumWidget, ArtistWidget, Component, EventListener};
use crate::app::dispatch::Worker;
use crate::app::models::{AlbumModel, A... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/search/search_model.rs | src/app/components/search/search_model.rs | use std::ops::Deref;
use std::rc::Rc;
use crate::app::dispatch::ActionDispatcher;
use crate::app::models::*;
use crate::app::state::{AppAction, AppModel, BrowserAction};
pub struct SearchResultsModel {
app_model: Rc<AppModel>,
dispatcher: Box<dyn ActionDispatcher>,
}
impl SearchResultsModel {
pub fn new(... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/search/mod.rs | src/app/components/search/mod.rs | #[allow(clippy::module_inception)]
mod search;
pub use search::*;
mod search_model;
pub use search_model::*;
mod search_button;
pub use search_button::*;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/playlist/song_actions.rs | src/app/components/playlist/song_actions.rs | use gdk::prelude::*;
use gio::SimpleAction;
use crate::app::models::SongDescription;
use crate::app::state::{AppAction, PlaybackAction};
use crate::app::ActionDispatcher;
impl SongDescription {
pub fn make_queue_action(
&self,
dispatcher: Box<dyn ActionDispatcher>,
name: Option<&str>,
... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/playlist/playlist.rs | src/app/components/playlist/playlist.rs | use gio::prelude::*;
use gtk::prelude::*;
use std::ops::Deref;
use std::rc::Rc;
use crate::app::components::utils::{ancestor, AnimatorDefault};
use crate::app::components::{Component, EventListener, SongWidget};
use crate::app::models::{SongListModel, SongModel, SongState};
use crate::app::state::{PlaybackEvent, Selec... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/playlist/mod.rs | src/app/components/playlist/mod.rs | #[allow(clippy::module_inception)]
mod playlist;
pub use playlist::*;
mod song;
pub use song::*;
mod song_actions;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/playlist/song.rs | src/app/components/playlist/song.rs | use crate::app::components::display_add_css_provider;
use crate::app::loader::ImageLoader;
use crate::app::models::SongModel;
use crate::app::Worker;
use gio::MenuModel;
use glib::subclass::InitializingObject;
use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::CompositeTemplate;
mod imp {
use super::*;... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/now_playing/now_playing_model.rs | src/app/components/now_playing/now_playing_model.rs | use gio::prelude::*;
use gio::SimpleActionGroup;
use std::ops::Deref;
use std::rc::Rc;
use crate::app::components::{
labels, DeviceSelectorModel, HeaderBarModel, PlaylistModel, SimpleHeaderBarModel,
SimpleHeaderBarModelWrapper,
};
use crate::app::models::{SongDescription, SongListModel};
use crate::app::state:... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/now_playing/mod.rs | src/app/components/now_playing/mod.rs | #[allow(clippy::module_inception)]
mod now_playing;
pub use now_playing::*;
mod now_playing_model;
pub use now_playing_model::*;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/now_playing/now_playing.rs | src/app/components/now_playing/now_playing.rs | use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::CompositeTemplate;
use std::rc::Rc;
use super::NowPlayingModel;
use crate::app::components::{
Component, DeviceSelector, DeviceSelectorWidget, EventListener, HeaderBarComponent,
HeaderBarWidget, Playlist,
};
use crate::app::state::PlaybackEvent;
use ... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/user_details/mod.rs | src/app/components/user_details/mod.rs | #[allow(clippy::module_inception)]
mod user_details;
pub use user_details::*;
mod user_details_model;
pub use user_details_model::*;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/user_details/user_details_model.rs | src/app/components/user_details/user_details_model.rs | use std::ops::Deref;
use std::rc::Rc;
use crate::app::models::*;
use crate::app::state::BrowserAction;
use crate::app::{ActionDispatcher, AppAction, AppModel, ListStore};
pub struct UserDetailsModel {
pub id: String,
app_model: Rc<AppModel>,
dispatcher: Box<dyn ActionDispatcher>,
}
impl UserDetailsModel ... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/components/user_details/user_details.rs | src/app/components/user_details/user_details.rs | use gtk::prelude::*;
use gtk::subclass::prelude::*;
use gtk::CompositeTemplate;
use std::rc::Rc;
use crate::app::components::utils::wrap_flowbox_item;
use crate::app::components::{display_add_css_provider, AlbumWidget, Component, EventListener};
use crate::app::{models::*, ListStore};
use crate::app::{AppEvent, Browse... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/mod.rs | src/app/models/mod.rs | // Domain models
mod main;
pub use main::*;
// UI models (GObject)
mod songs;
pub use songs::*;
mod album_model;
pub use album_model::*;
mod artist_model;
pub use artist_model::*;
impl From<&AlbumDescription> for AlbumModel {
fn from(album: &AlbumDescription) -> Self {
AlbumModel::new(
&albu... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/main.rs | src/app/models/main.rs | use std::{
hash::{Hash, Hasher},
str::FromStr,
};
use crate::app::SongsSource;
// A batch of whatever
#[derive(Clone, Copy, Debug)]
pub struct Batch {
// What offset does the batch start at
pub offset: usize,
// How many elements
pub batch_size: usize,
// Total number of elements if we had... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/artist_model.rs | src/app/models/artist_model.rs | #![allow(clippy::all)]
use gio::prelude::*;
use glib::subclass::prelude::*;
use glib::Properties;
// UI model!
glib::wrapper! {
pub struct ArtistModel(ObjectSubclass<imp::ArtistModel>);
}
impl ArtistModel {
pub fn new(artist: &str, image: &Option<String>, id: &str) -> ArtistModel {
glib::Object::buil... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/album_model.rs | src/app/models/album_model.rs | #![allow(clippy::all)]
use gio::prelude::*;
use glib::subclass::prelude::*;
use glib::Properties;
// UI model!
// Despite the name, it can represent a playlist as well
glib::wrapper! {
pub struct AlbumModel(ObjectSubclass<imp::AlbumModel>);
}
impl AlbumModel {
pub fn new(
artist: &String,
alb... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/songs/support.rs | src/app/models/songs/support.rs | use std::collections::HashMap;
use std::convert::{TryFrom, TryInto};
use crate::app::models::*;
// A range of numbers [a, b], empty range is allowed as well
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum Range {
Empty,
NotEmpty(u32, u32),
}
impl Range {
// Create a range [a, b] if b >= a, or an empty ... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/songs/song_list_model.rs | src/app/models/songs/song_list_model.rs | use gio::prelude::*;
use gio::ListModel;
use glib::Properties;
use gtk::subclass::prelude::*;
use std::cell::{Cell, Ref, RefCell, RefMut};
use super::support::*;
use crate::app::models::*;
// A struct to perform multiple mutations on a SongListModel
// Eventually commit() must be called to send an update signal with ... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/songs/mod.rs | src/app/models/songs/mod.rs | // The underlying data structure for a list of songs
mod support;
// A GObject wrapper around that list
mod song_list_model;
pub use song_list_model::*;
mod song_model;
pub use song_model::*;
| rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/app/models/songs/song_model.rs | src/app/models/songs/song_model.rs | #![allow(clippy::all)]
use gio::prelude::*;
use glib::{subclass::prelude::*, SignalHandlerId};
use std::{cell::Ref, ops::Deref};
use crate::app::components::utils::format_duration;
use crate::app::models::*;
// UI model for a song
glib::wrapper! {
pub struct SongModel(ObjectSubclass<imp::SongModel>);
}
impl Son... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/api/api_models.rs | src/api/api_models.rs | use form_urlencoded::Serializer;
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::{
collections::HashSet,
convert::{Into, TryFrom, TryInto},
vec::IntoIter,
};
use crate::app::{models::*, SongsSource};
#[derive(Serialize)]
pub struct PlaylistDetails {
pub name: String,
}
#[derive(Serial... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/api/client.rs | src/api/client.rs | use form_urlencoded::Serializer;
use isahc::config::Configurable;
use isahc::http::{method::Method, request::Builder, StatusCode, Uri};
use isahc::{AsyncReadResponseExt, HttpClient, Request};
use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
use serde::{de::Deserialize, Serialize};
use serde_json::from_s... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/api/mod.rs | src/api/mod.rs | mod api_models;
mod cached_client;
mod client;
pub mod cache;
pub use cached_client::{CachedSpotifyClient, SpotifyApiClient, SpotifyResult};
pub use client::SpotifyApiError;
pub async fn clear_user_cache() -> Option<()> {
cache::CacheManager::for_dir("riff/net")?
.clear_cache_pattern(&cached_client::USER... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/api/cache.rs | src/api/cache.rs | use core::mem::size_of;
use futures::join;
use regex::Regex;
use std::path::{PathBuf,Path};
use std::convert::From;
use std::future::Future;
use std::time::{Duration, SystemTime};
use tokio::{fs, io};
use thiserror::Error;
const EXPIRY_FILE_EXT: &str = ".expiry";
#[derive(Error, Debug)]
pub enum CacheError {
#[er... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/api/cached_client.rs | src/api/cached_client.rs | use futures::future::BoxFuture;
use futures::{join, FutureExt};
use regex::Regex;
use serde::de::DeserializeOwned;
use serde_json::from_slice;
use std::convert::Into;
use std::future::Future;
use std::sync::Arc;
use super::cache::{CacheExpiry, CacheManager, CachePolicy, FetchResult};
use super::client::*;
use crate::a... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/player/player.rs | src/player/player.rs | use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender};
use futures::stream::StreamExt;
use librespot::core::authentication::Credentials;
use librespot::core::cache::Cache;
use librespot::core::config::SessionConfig;
use librespot::core::session::Session;
use librespot::playback::mixer::softmixer::SoftMixer... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/player/token_store.rs | src/player/token_store.rs | use tokio::sync::RwLock;
use crate::app::credentials::Credentials;
pub struct TokenStore {
storage: RwLock<Option<Credentials>>,
}
impl TokenStore {
pub fn new() -> Self {
Self {
storage: RwLock::new(None),
}
}
pub fn get_cached_blocking(&self) -> Option<Credentials> {
... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/player/mod.rs | src/player/mod.rs | use futures::channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender};
use librespot::core::SpotifyUri;
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use tokio::task;
use url::Url;
use crate::app::state::{LoginAction, PlaybackAction};
use crate::app::AppAction;
#[allow(clippy::module_inception)]
m... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/player/oauth2.rs | src/player/oauth2.rs | //! Provides a Spotify access token using the OAuth authorization code flow
//! with PKCE.
//!
//! Assuming sufficient scopes, the returned access token may be used with Spotify's
//! Web API, and/or to establish a new Session with [`librespot_core`].
//!
//! The authorization code flow is an interactive process which ... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/connect/player.rs | src/connect/player.rs | use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};
use std::sync::{Arc, RwLock};
use futures::channel::mpsc::UnboundedSender;
use gettextrs::gettext;
use crate::api::{SpotifyApiClient, SpotifyApiError, SpotifyResult};
use crate::app::models::{ConnectPlayerState, RepeatMode, SongDescription}... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
Diegovsky/riff | https://github.com/Diegovsky/riff/blob/28e5c58658aaee9095b3ed7b6f92bfefeca4baa1/src/connect/mod.rs | src/connect/mod.rs | use std::sync::Arc;
use std::time::Duration;
use futures::channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender};
use futures::StreamExt;
use tokio::{task, time};
use crate::api::SpotifyApiClient;
use crate::app::AppAction;
mod player;
pub use player::ConnectCommand;
#[tokio::main]
async fn connect_server(
... | rust | MIT | 28e5c58658aaee9095b3ed7b6f92bfefeca4baa1 | 2026-01-04T20:22:28.974811Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/lib.rs | src/lib.rs | extern crate vec_map;
pub mod classfile;
pub mod classpath;
pub mod instruction;
pub mod rtda;
pub mod shell;
pub mod util;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/util/modified_utf8.rs | src/util/modified_utf8.rs | //! From [rust-jvm](https://github.com/maxmcc/rust-jvm/)
//! Modified UTF-8 string slices.
//!
//! See [§4.4.7](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.7).
use std::char;
/// Errors which can occur when attempting to interpret a sequence of `u8` as a modified UTF-8
/// string.
#[derive... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/util/code_reader.rs | src/util/code_reader.rs | extern crate byteorder;
use self::byteorder::{BigEndian, ByteOrder};
use std;
use std::rc::Rc;
pub struct CodeReader {
code: Rc<Vec<u8>>,
pub pc: usize,
}
impl CodeReader {
pub fn new(code: Rc<Vec<u8>>) -> CodeReader {
CodeReader { code, pc: 0 }
}
pub fn set_pc(self, pc: usize) -> CodeRe... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/util/mod.rs | src/util/mod.rs | pub mod code_reader;
pub mod converter;
pub mod modified_utf8;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/util/converter.rs | src/util/converter.rs | use std;
pub fn i32_to_f32(val: i32) -> f32 {
unsafe { std::mem::transmute::<i32, f32>(val) }
}
pub fn f32_to_i32(val: f32) -> i32 {
unsafe { std::mem::transmute::<f32, i32>(val) }
}
pub fn i64_to_i32seq(val: i64) -> [i32; 2] {
unsafe { std::mem::transmute::<i64, [i32; 2]>(val) }
}
pub fn f64_to_i32seq(... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/instruction.rs | src/instruction/instruction.rs | use instruction::comparison::dcmp::*;
use instruction::comparison::fcmp::*;
use instruction::comparison::if_icmp::*;
use instruction::comparison::ifcond::*;
use instruction::comparison::lcmp::*;
use instruction::constant::ldc::*;
use instruction::constant::nop::NOP;
use instruction::constant::xconst::*;
use instruction... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/mod.rs | src/instruction/mod.rs | mod comparison;
mod constant;
mod control;
pub mod instruction;
mod load;
mod math;
mod store;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/constant/ldc.rs | src/instruction/constant/ldc.rs | use classfile::constant_info::ConstantInfo;
use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn LDC(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("LDC");
let (index... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/constant/mod.rs | src/instruction/constant/mod.rs | pub mod ldc;
pub mod nop;
pub mod xconst;
pub mod xipush;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/constant/xconst.rs | src/instruction/constant/xconst.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn DCONST_0(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("DCONST_0");
let (frame, thread) = thread.pop_frame();
... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/constant/xipush.rs | src/instruction/constant/xipush.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn BIPUSH(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("BIPUSH");
let (frame, thread) = thread.pop_frame();
l... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/constant/nop.rs | src/instruction/constant/nop.rs | use instruction::instruction::ExecuteResult;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn NOP(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
let execute_result = ExecuteResult { thread, offset: 0 };
(execute_result, code_reader)
}
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/comparison/dcmp.rs | src/instruction/comparison/dcmp.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
fn _dcmp(frame: Frame, flag: bool) -> (f64, f64, Frame) {
let Frame {
operand_stack,
local_vars,
method,
class,
} = frame;
... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/comparison/fcmp.rs | src/instruction/comparison/fcmp.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
fn _fcmp(frame: Frame, flag: bool) -> (f32, f32, Frame) {
let Frame {
operand_stack,
local_vars,
method,
class,
} = frame;
... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/comparison/lcmp.rs | src/instruction/comparison/lcmp.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn LCMP(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
let (frame, thread) = thread.pop_frame();
let Frame {
operand_... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/comparison/ifcond.rs | src/instruction/comparison/ifcond.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
fn _ifcond(frame: Frame) -> (i32, Frame) {
let Frame {
operand_stack,
local_vars,
method,
class,
} = frame;
let (val, operand_stack) = operand_s... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/comparison/mod.rs | src/instruction/comparison/mod.rs | pub mod dcmp;
pub mod fcmp;
pub mod if_icmp;
pub mod ifcond;
pub mod lcmp;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/comparison/if_icmp.rs | src/instruction/comparison/if_icmp.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
fn _icmpPop(frame: Frame) -> (i32, i32, Frame) {
let Frame {
operand_stack,
local_vars,
method,
class,
} = frame;
let (... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/store/istore.rs | src/instruction/store/istore.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
fn _istore(frame: Frame, index: usize) -> Frame {
let Frame {
operand_stack,
local_vars,
method,
class,
} = frame;
let (val, operand_stack) = ope... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/store/mod.rs | src/instruction/store/mod.rs | pub mod istore;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/math/mod.rs | src/instruction/math/mod.rs | pub mod add;
pub mod and;
pub mod inc;
pub mod mul;
pub mod neg;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/math/inc.rs | src/instruction/math/inc.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn IINC(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("IINC");
let (frame, thread) = thread.pop_frame();
let ... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/math/neg.rs | src/instruction/math/neg.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn DNEG(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
let (frame, thread) = thread.pop_frame();
let Frame {
operand... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/math/and.rs | src/instruction/math/and.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn IAND(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
let (frame, thread) = thread.pop_frame();
let Frame {
operand... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/math/add.rs | src/instruction/math/add.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn IADD(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("IADD");
let (frame, thread) = thread.pop_frame();
let F... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/math/mul.rs | src/instruction/math/mul.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn DMUL(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("DMUL");
let (frame, thread) = thread.pop_frame();
let ... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/load/mod.rs | src/instruction/load/mod.rs | pub mod iload;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/load/iload.rs | src/instruction/load/iload.rs | use instruction::instruction::ExecuteResult;
use rtda::frame::Frame;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
fn _iload(frame: Frame, index: usize) -> Frame {
let Frame {
operand_stack,
local_vars,
method,
class,
} = frame;
let val = local_vars.get_int(in... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/control/goto.rs | src/instruction/control/goto.rs | use instruction::instruction::ExecuteResult;
use rtda::thread::Thread;
use util::code_reader::CodeReader;
#[allow(non_snake_case)]
pub fn GOTO(code_reader: CodeReader, thread: Thread) -> (ExecuteResult, CodeReader) {
println!("GOTO");
let (offset, code_reader) = code_reader.read_i16();
let offset = offset... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/instruction/control/mod.rs | src/instruction/control/mod.rs | pub mod goto;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/bin/main.rs | src/bin/main.rs | extern crate jvm;
use jvm::classpath::classpath::parse;
use jvm::instruction::instruction;
use jvm::instruction::instruction::ExecuteResult;
use jvm::rtda::frame::Frame;
use jvm::rtda::heap::class::Class;
use jvm::rtda::heap::class_loader::ClassLoader;
use jvm::rtda::heap::method::Method;
use jvm::rtda::thread::Thread... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/constant_info.rs | src/classfile/constant_info.rs | #[derive(Debug)]
pub enum ConstantInfo {
Integer(i32),
Float(f32),
Long(i64),
Double(f64),
UTF8(String),
String(u16),
Class {
name_index: u16,
},
NameAndType {
name_index: u16,
descriptor_index: u16,
},
FieldRef {
class_index: u16,
name... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/class_reader.rs | src/classfile/class_reader.rs | extern crate byteorder;
use vec_map::VecMap;
use self::byteorder::{BigEndian, ByteOrder};
use classfile::attribute_info::{
AttributeInfo, ExceptionTableEntry, LineNumberTableEntry, LocalVariableTableEntry,
};
use classfile::class_file::ClassFile;
use classfile::constant_info::ConstantInfo;
use classfile::constan... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/member_info.rs | src/classfile/member_info.rs | use classfile::attribute_info::AttributeInfo;
#[derive(Debug)]
pub struct MemberInfo {
pub access_flags: u16,
pub name: String,
pub name_index: u16,
pub descriptor_index: u16,
pub descriptor: String,
pub attributes: Vec<AttributeInfo>,
}
impl MemberInfo {
pub fn code_attribute(&self) -> Op... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/mod.rs | src/classfile/mod.rs | extern crate vec_map;
pub mod attribute_info;
pub mod class_file;
pub mod class_reader;
pub mod constant_info;
pub mod constant_pool;
pub mod member_info;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/attribute_info.rs | src/classfile/attribute_info.rs | use std::rc::Rc;
#[derive(Debug)]
pub struct ExceptionTableEntry {
pub start_pc: u16,
pub end_pc: u16,
pub handler_pc: u16,
pub catch_type: u16,
}
#[derive(Debug)]
pub struct LineNumberTableEntry {
pub start_pc: u16,
pub line_number: u16,
}
#[derive(Debug)]
pub struct LocalVariableTableEntry ... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/class_file.rs | src/classfile/class_file.rs | use classfile::attribute_info::AttributeInfo;
use classfile::constant_pool::ConstantPool;
use classfile::member_info::MemberInfo;
#[derive(Debug)]
pub struct ClassFile {
pub major_version: u16,
pub minor_version: u16,
pub constant_pool: ConstantPool,
pub access_flags: u16,
pub this_class: u16,
... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classfile/constant_pool.rs | src/classfile/constant_pool.rs | use classfile::constant_info::ConstantInfo;
use vec_map::VecMap;
#[derive(Debug)]
pub struct ConstantPool {
pub vec_map: VecMap<ConstantInfo>,
}
impl ConstantPool {
pub fn insert(&mut self, index: usize, constant_info: ConstantInfo) {
self.vec_map.insert(index, constant_info);
}
pub fn get(&s... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/shell/command.rs | src/shell/command.rs | pub struct Command<'a> {
pub class_name: String,
pub cp_opt: Option<String>,
pub jre_opt: Option<String>,
pub args: Vec<&'a str>,
}
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/shell/mod.rs | src/shell/mod.rs | pub mod command;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classpath/classpath.rs | src/classpath/classpath.rs | extern crate zip;
use std::env;
use std::fs::read_dir;
use std::fs::File;
use std::io;
use std::io::Error;
use std::io::ErrorKind;
use std::io::Read;
use std::path::Path;
use std::path::PathBuf;
#[derive(Debug)]
enum Entry {
Dir { path: PathBuf },
Wildcard { path_vec: Vec<PathBuf> },
Zip { path: PathBuf }... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/classpath/mod.rs | src/classpath/mod.rs | pub mod classpath;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/vars.rs | src/rtda/vars.rs | extern crate vec_map;
use self::vec_map::VecMap;
use rtda::slot::Slot;
#[derive(Debug)]
pub struct Vars {
vec_map: VecMap<Slot>,
}
impl Vars {
pub fn new(max_locals: usize) -> Vars {
if max_locals > 0 {
let vec_map = VecMap::with_capacity(max_locals);
Vars { vec_map }
... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/slot.rs | src/rtda/slot.rs | #[derive(Debug)]
pub enum Slot {
Num(i32),
}
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/mod.rs | src/rtda/mod.rs | pub mod frame;
pub mod heap;
pub mod operand_stack;
mod slot;
mod stack;
pub mod thread;
pub mod vars;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/stack.rs | src/rtda/stack.rs | use rtda::frame::Frame;
pub struct Stack {
max_size: usize,
vec: Vec<Frame>,
}
impl Stack {
pub fn new(max_size: usize) -> Stack {
let vec = Vec::with_capacity(max_size);
Stack { max_size, vec }
}
pub fn push(mut self, frame: Frame) -> Stack {
if self.vec.len() == self.max... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/frame.rs | src/rtda/frame.rs | use rtda::heap::class::Class;
use rtda::heap::method::Method;
use rtda::operand_stack::OperandStack;
use rtda::vars::Vars;
use std::rc::Rc;
#[derive(Debug)]
pub struct Frame {
pub local_vars: Vars,
pub operand_stack: OperandStack,
pub method: Rc<Method>,
pub class: Rc<Class>,
}
impl Frame {
pub fn... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/operand_stack.rs | src/rtda/operand_stack.rs | use rtda::slot::Slot;
use util::converter;
#[derive(Debug)]
pub struct OperandStack {
vec: Vec<Slot>,
}
impl OperandStack {
pub fn new(max_stack: usize) -> OperandStack {
OperandStack {
vec: Vec::with_capacity(max_stack),
}
}
pub fn push_int(mut self, val: i32) -> OperandS... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/thread.rs | src/rtda/thread.rs | use rtda::frame::Frame;
use rtda::stack::Stack;
const STACK_SIZE: usize = 1024;
pub struct Thread {
stack: Stack,
}
impl Thread {
pub fn new() -> Thread {
Thread {
stack: Stack::new(STACK_SIZE),
}
}
pub fn push_frame(self, frame: Frame) -> Thread {
let Thread { st... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/class_loader.rs | src/rtda/heap/class_loader.rs | use classfile::class_file::ClassFile;
use classfile::class_reader::ClassReader;
use classfile::constant_info::ConstantInfo;
use classfile::constant_pool::ConstantPool;
use classpath::classpath::ClassPath;
use rtda::heap::class::Class;
use rtda::heap::field::Field;
use rtda::heap::method::Method;
use rtda::vars::Vars;... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/symbol_ref.rs | src/rtda/heap/symbol_ref.rs | use classfile::constant_pool::ConstantPool;
use rtda::heap::class::Class;
use std::rc::Rc;
use classfile::constant_info::ConstantInfo;
pub struct SymbolRef {
constant_pool: Rc<ConstantPool>,
class_name: String,
class: Rc<Class>,
}
impl SymbolRef {
fn new(constant_pool: Rc<ConstantPool>, constant_class... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/field.rs | src/rtda/heap/field.rs | use classfile::attribute_info::AttributeInfo;
use classfile::member_info::MemberInfo;
use rtda::heap::class_member::ClassMember;
#[derive(Debug)]
pub struct Field {
pub class_member: ClassMember,
pub constant_value_index: Option<usize>,
}
impl Field {
pub fn new(member_info: MemberInfo) -> Field {
... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/object.rs | src/rtda/heap/object.rs | use rtda::heap::class::Class;
use rtda::slot::Slot;
struct Object {
class: Class,
fields: Vec<Slot>,
}
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/class_ref.rs | src/rtda/heap/class_ref.rs | use rtda::heap::symbol_ref::SymbolRef;
use std::rc::Rc;
use classfile::constant_pool::ConstantPool;
use classfile::constant_info::ConstantInfo;
struct ClassRef {
symbol_ref: SymbolRef,
}
impl ClassRef {
fn new(constant_pool: Rc<ConstantPool>, constant_class_info: ConstantInfo) -> ClassRef {
let symbol... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/class.rs | src/rtda/heap/class.rs | use classfile::constant_pool::ConstantPool;
use rtda::heap::field::Field;
use rtda::heap::method::Method;
use rtda::vars::Vars;
use std::rc::Rc;
#[derive(Debug)]
pub struct Class {
pub access_flags: u16,
pub name: String,
// pub super_class_name: String,
// interface_names: Vec<String>,
pub c... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/mod.rs | src/rtda/heap/mod.rs | mod access_flags;
pub mod class;
pub mod class_loader;
mod class_member;
mod field;
pub mod method;
mod object;
| rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
standbyme/jvm-rs | https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/method.rs | src/rtda/heap/method.rs | use classfile::attribute_info::AttributeInfo;
use classfile::member_info::MemberInfo;
use rtda::heap::class_member::ClassMember;
use std::rc::Rc;
#[derive(Debug)]
pub struct Method {
class_member: ClassMember,
pub max_locals: usize,
pub max_stack: usize,
pub code: Rc<Vec<u8>>,
}
impl Method {
pub ... | rust | MIT | ebdc07e9049d84688effdccec03a0a5b0aeda0bb | 2026-01-04T20:23:41.645579Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.