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 |
|---|---|---|---|---|---|---|---|---|
amPerl/egui-phosphor | https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/examples/multiple_variants.rs | examples/multiple_variants.rs | use std::sync::Arc;
use egui::ViewportBuilder;
use egui_phosphor::{bold, fill, light, regular, thin};
fn main() {
eframe::run_native(
"egui-phosphor demo",
eframe::NativeOptions {
viewport: ViewportBuilder::default().with_inner_size((320.0, 755.0)),
..Default::default()
... | rust | Apache-2.0 | c33b60c40f703ffa3d40d252f1bc911cf531581d | 2026-01-04T20:22:14.235772Z | false |
amPerl/egui-phosphor | https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/examples/debug_alignment.rs | examples/debug_alignment.rs | fn main() {
eframe::run_native(
"egui-phosphor demo",
Default::default(),
Box::new(|cc| Ok(Box::new(Demo::new(cc)))),
)
.unwrap();
}
struct Demo {}
impl Demo {
fn new(cc: &eframe::CreationContext) -> Self {
let mut fonts = egui::FontDefinitions::default();
egui_... | rust | Apache-2.0 | c33b60c40f703ffa3d40d252f1bc911cf531581d | 2026-01-04T20:22:14.235772Z | false |
amPerl/egui-phosphor | https://github.com/amPerl/egui-phosphor/blob/c33b60c40f703ffa3d40d252f1bc911cf531581d/examples/list_all.rs | examples/list_all.rs | fn main() {
eframe::run_native(
"egui-phosphor demo",
Default::default(),
Box::new(|cc| Ok(Box::new(Demo::new(cc)))),
)
.unwrap();
}
struct Demo {}
impl Demo {
fn new(cc: &eframe::CreationContext) -> Self {
let mut fonts = egui::FontDefinitions::default();
egui_... | rust | Apache-2.0 | c33b60c40f703ffa3d40d252f1bc911cf531581d | 2026-01-04T20:22:14.235772Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/build.rs | build.rs | // For embedding application icons, in Windows.
use std::{env, io};
use winresource::WindowsResource;
fn main() -> io::Result<()> {
if env::var_os("CARGO_CFG_WINDOWS").is_some() {
WindowsResource::new()
// This path can be absolute, or relative to your crate root.
.set_icon("src/r... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/external_websites.rs | src/external_websites.rs | //! For opening the browser to NCBI BLAST, PDB etc.
//!
//! PDB Search API: https://search.rcsb.org/#search-api
//! PDB Data API: https://data.rcsb.org/#data-api
use bio_apis::ncbi;
use crate::{Selection, state::State};
/// BLAST the selected Feature, primer, or selection. Prioritize the selection.
/// This function... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/solution_helper.rs | src/solution_helper.rs | //! This module contains code for assisting with mixing common solutions
| rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/ligation.rs | src/ligation.rs | use na_seq::restriction_enzyme::RestrictionEnzyme;
| rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/misc_types.rs | src/misc_types.rs | //! This module contains fundamental data structures, eg related to features, metadata, etc.
use bincode::{Decode, Encode};
use na_seq::Nucleotide;
use crate::{
Color,
primer::PrimerDirection,
util::{RangeIncl, match_subseq},
};
pub const MIN_SEARCH_LEN: usize = 3;
#[derive(Clone, Copy, PartialEq, Encode... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/feature_db_load.rs | src/feature_db_load.rs | //! A library of known sequences we can use to automatically add features to a sequence.
//! This will eventually load data from an online source. Currently, it includes some common items,
//! and is stored in memory.
//!
//! Some common genes: https://en.vectorbuilder.com/search/gene.html
use na_seq::{
Nucleotide... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | true |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/melting_temp_calcs.rs | src/melting_temp_calcs.rs | #![allow(non_snake_case)]
//! Primer melting temperature calculations. Modified from [BioPython's module here](https://github.com/biopython/biopython/blob/master/Bio/SeqUtils/MeltingTemp.py)
//! We use an approach that calculates enthalpy and entropy of neighbors basd on empirical data,
//! and apply salt corrections ... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/alignment.rs | src/alignment.rs | use bio::alignment::{
Alignment,
distance::simd::{bounded_levenshtein, hamming, levenshtein},
pairwise::Aligner,
};
use na_seq::{AminoAcid, Nucleotide, Seq, seq_aa_to_u8_lower, seq_to_u8_lower};
#[derive(Clone, Copy, PartialEq)]
pub enum AlignmentMode {
Dna,
AminoAcid,
}
impl Default for Alignment... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/state.rs | src/state.rs | //! Data structures relalted to general state.
use std::{
io,
path::{Path, PathBuf},
time::Instant,
};
use bio_files::SeqRecordAb1;
use copypasta::{ClipboardContext, ClipboardProvider};
use eframe::egui::Context;
use na_seq::{
Nucleotide, Seq, insert_into_seq,
ligation::LigationFragment,
re_li... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/primer.rs | src/primer.rs | //! This module contains code related to primer (oglionucleotide) design and QC.
use bincode::{Decode, Encode};
use eframe::egui::Color32;
use na_seq::{Nucleotide, Seq, seq_complement, seq_from_str, seq_to_str_lower, seq_weight};
use crate::{
gui::{PRIMER_FWD_COLOR, PRIMER_REV_COLOR, primer_table::DEFAULT_TRIM_AM... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/protein.rs | src/protein.rs | //! Data related to proteins, eg derived from coding region features, in conjunction with
//! reading frames.
use bincode::{Decode, Encode};
use bio_apis::rcsb::PdbData;
use na_seq::{
Nucleotide,
amino_acids::{AminoAcid, CodingResult, hydropathy_doolittle},
};
use crate::{
misc_types::{Feature, FeatureTyp... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/util.rs | src/util.rs | use std::{cmp::min, collections::HashSet, fmt, io, io::ErrorKind, path::Path};
use bincode::{Decode, Encode};
use eframe::egui::{Pos2, pos2};
use na_seq::{
Nucleotide,
ligation::{filter_multiple_seqs, filter_unique_cutters, find_common_res},
restriction_enzyme::RestrictionEnzyme,
seq_complement,
};
us... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/backbones.rs | src/backbones.rs | //! This module contains data structures and related for vector backbones, used for cloning. It also pulls data from Addgene.
//! [Popular AddGene Bacterial expression backbones](https://www.addgene.org/search/catalog/plasmids/?sticky=no&q=empty+backbone&page_size=20&expression=Bacterial+Expression&requests=100%2B+req... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | true |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/alignment_map.rs | src/alignment_map.rs | //! Data structures and related code for BAM and SAM alignment map data.
//! [SAM/BAM spec document, CAO Nov 2024](https://samtools.github.io/hts-specs/SAMv1.pdf)
//!
//! BAM format is little endian.
use std::{
fs::File,
io,
io::{BufRead, ErrorKind, Read},
path::Path,
};
use bgzip::{BGZFError, BGZFRea... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/toxic_proteins.rs | src/toxic_proteins.rs | //! Contains code related to identifying toxic proteins.
use na_seq::{
Nucleotide,
amino_acids::{AminoAcid, CodingResult},
};
use crate::protein::proteins_from_seq;
const GLN_TRACT_SCAN_FRAME: usize = 35;
const GLN_MAX_PORTION: f32 = 0.75;
#[derive(Clone, Copy, PartialEq)]
enum ToxicStatus {
Pass,
F... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/pcr.rs | src/pcr.rs | //! This module assists in identifying PCR parameters
use bincode::{Decode, Encode};
use na_seq::Seq;
use crate::{
gui::navigation::{Page, PageSeq, Tab},
primer::{Primer, TM_TARGET},
state::State,
util::RangeIncl,
};
#[derive(Clone, Encode, Decode)]
/// Variables for UI fields, for determining PCR pa... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/tags.rs | src/tags.rs | //! This module contains info related to tags, like the 6x HIS tag.
use std::ops::RangeInclusive;
use na_seq::Nucleotide;
pub struct TagMatch {
pub lib_index: usize,
// todo: Experimenting with ranges vice (usize, usize)
/// 0-based indexing.
pub seq: RangeInclusive<usize>,
}
pub struct Tag {
pu... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/portions.rs | src/portions.rs | //! Code related to mixing portions. Used for performing quick mixing volume calculations.
// todo: Consider including pKa info, and including tools to balance pH.
use std::fmt::Display;
use bincode::{Decode, Encode};
#[derive(Clone, Encode, Decode)]
pub struct PortionsState {
pub solutions: Vec<Solution>,
... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/feature_db_builder.rs | src/feature_db_builder.rs | //! This is the entrypoint for a standalone program that parse features from GenBank and SnapGene files.
//! It assigns each sequence a label and feature type.
use std::{
fs,
path::{Path, PathBuf},
str::FromStr,
};
mod file_io;
mod gui;
mod primer;
mod sequence; // Required due to naviation::Page being in... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/save_compat.rs | src/save_compat.rs | //! This module contains archived state structs used to open saves from previous versions
//! of this program, and convert them to the latest version.
| rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/main.rs | src/main.rs | // Disables the terminal window. Use this for releases, and disable when debugging.
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
// todo: Build a database of feature sequences. You can find GenBank etc files online (addGene, and other sources)
// todo: and pa... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/reading_frame.rs | src/reading_frame.rs | use std::fmt::Display;
use bincode::{Decode, Encode};
use na_seq::{
Nucleotide,
Nucleotide::{A, G, T},
Seq, seq_complement,
};
use crate::util::RangeIncl;
const START_CODON: [Nucleotide; 3] = [A, T, G];
pub const STOP_CODONS: [[Nucleotide; 3]; 3] = [[T, A, A], [T, A, G], [T, G, A]];
/// Of the 6 possibl... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/cloning.rs | src/cloning.rs | //! Used for a semi-automated cloning process that chooses a suitable backbone and restriction enzymes
//! or primers.
//!
//! todo: Make sure you're QCing and filtering for expression system.
//!
//! todo: Allow users to enter custom backbones.
use na_seq::{
AminoAcid, CodingResult, Nucleotide, Seq, insert_into_... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/primer_metrics.rs | src/primer_metrics.rs | //! This module handles assessing various primer metrics, such as GC concentration, and repeats.
use bincode::{Decode, Encode};
use lin_alg::map_linear;
use na_seq::{
Nucleotide,
Nucleotide::{C, G},
calc_gc,
};
use crate::{
TM_TARGET, melting_temp_calcs,
primer::{IonConcentrations, MIN_PRIMER_LEN,... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/file_io/genbank.rs | src/file_io/genbank.rs | //! Parse and write GenBank files. This converts between this format for sequences, features,
//! primers, notes etc., and our own equivalents. We use the [gb_io](https://docs.rs/gb-io/latest/gb_io)
//! library.
//!
//! (NIH article on GenBank)[https://www.ncbi.nlm.nih.gov/genbank/]
use std::{
fs::File,
io::{s... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/file_io/pcad.rs | src/file_io/pcad.rs | //! This module contains code for saving and loading in our own PCAD format.
//!
//! This is a binary format that uses packets for each of several message types. This sytem
//! should have better backwards compatibility than raw serialization and deserialization using
//! Bincode or similar.
//!
//! Byte encoding is bi... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/file_io/mod.rs | src/file_io/mod.rs | //! This module contains code for saving and loading in several file formats.
use std::{path::Path, sync::Arc};
use egui_file_dialog::{FileDialog, FileDialogConfig};
use na_seq::{Seq, SeqTopology};
use crate::{
file_io::save::{DEFAULT_DNA_FILE, DEFAULT_FASTA_FILE, DEFAULT_GENBANK_FILE, QUICKSAVE_FILE},
misc_... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/file_io/save.rs | src/file_io/save.rs | //! This module includes code for reading and writing our PlasCAD binary fileformat.
//!
//! Todo: Break into packets. This may require further ejecting from bincode, at least at the top level[s].
use std::{
env,
fs::File,
io,
io::{ErrorKind, Read, Write},
path::{Path, PathBuf},
};
use bincode::{
... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/file_io/ab1_tags.rs | src/file_io/ab1_tags.rs | //! [BioPython code](https://github.com/biopython/biopython/blob/master/Bio/SeqIO/AbiIO.py)
use std::{fmt::Display, io, io::ErrorKind};
#[derive(Clone, Copy, PartialEq)]
enum TagSeqRecord {
SampleWell,
Dye,
Polymer,
MachineModel,
}
// todo: Tag to string rep?
impl TagSeqRecord {
fn from_str(inp: &... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/file_io/snapgene.rs | src/file_io/snapgene.rs | //! Parse and write SnapGene DNA files. This converts between the Snapgene format for sequences, features,
//! primers, notes etc., and our own equivalents.
//!
//! (Unofficial file format description)[https://incenp.org/dvlpt/docs/binary-sequence-formats/binary-sequence-formats.pdf]
//! DNA files are divided into pack... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/primer_table.rs | src/gui/primer_table.rs | //! This module contains code to the primer editor, QC etc.
use eframe::egui::{Align, Color32, Layout, RichText, ScrollArea, TextEdit, Ui};
use egui_extras::{Column, TableBuilder};
use na_seq::{seq_from_str, seq_to_str_lower};
use crate::{
Selection,
gui::{
COL_SPACING, ROW_SPACING,
theme::{CO... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/lin_maps.rs | src/gui/lin_maps.rs | //! Contains code for our mini view above the circlular map.
use eframe::{
egui::{
Align2, Color32, FontFamily, FontId, Frame, Pos2, Rect, Sense, Shape, Stroke, Ui, pos2,
vec2,
},
emath::RectTransform,
};
use lin_alg::map_linear;
use na_seq::restriction_enzyme::{ReMatch, RestrictionEnzyme};... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/ligation.rs | src/gui/ligation.rs | //! GUI code related to ligation operations.
use std::{collections::HashMap, path::PathBuf};
use eframe::{
egui::{
Align2, Color32, FontFamily, FontId, Frame, Pos2, Rect, RichText, ScrollArea, Sense, Shape,
Stroke, Ui, pos2, vec2,
},
emath::RectTransform,
};
use lin_alg::map_linear;
use na... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/theme.rs | src/gui/theme.rs | use eframe::egui::Color32;
pub const COLOR_ACTION: Color32 = Color32::GOLD;
pub const COLOR_INFO: Color32 = Color32::LIGHT_BLUE;
| rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/alignment.rs | src/gui/alignment.rs | use eframe::egui::{Color32, FontFamily, FontId, RichText, ScrollArea, TextEdit, Ui};
use na_seq::{seq_aa_from_str, seq_aa_to_str, seq_from_str, seq_to_str_lower};
use crate::{
alignment::{AlignmentMode, align_pairwise_aa, align_pairwise_nt, distance_aa, distance_nt},
gui::{
COL_SPACING, ROW_SPACING,
... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/protein.rs | src/gui/protein.rs | use bio_apis::rcsb::{self, PdbData};
use eframe::{
egui::{
Align2, Color32, FontFamily, FontId, Frame, Pos2, Rect, RichText, ScrollArea, Sense, Shape,
Stroke, Ui, pos2, vec2,
},
emath::RectTransform,
epaint::PathShape,
};
use na_seq::{AaIdent, AminoAcid};
use crate::{
gui::{
... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/navigation.rs | src/gui/navigation.rs | //! This module contains code related to navigation buttons.
use std::{fmt::Display, path::PathBuf};
use bincode::{Decode, Encode};
use eframe::egui::{Color32, RichText, Ui};
use na_seq::seq_to_str_lower;
use crate::{
gui::{COL_SPACING, ROW_SPACING, select_color_text, set_window_title},
state::State,
};
pub... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/circle.rs | src/gui/circle.rs | //! A module for the circular view of a plasmid
use core::f32::consts::TAU;
use eframe::{
egui::{
Align2, Color32, CursorIcon, FontFamily, FontId, Frame, Pos2, Rect, RichText, ScrollArea,
Sense, Shape, Slider, Stroke, Ui, pos2, vec2,
},
emath::RectTransform,
epaint::{CircleShape, PathS... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | true |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/mod.rs | src/gui/mod.rs | //! GUI entry point
//!
//! [Useful emojis supported by EGUI](https://github.com/emilk/egui/blob/9a1e358a144b5d2af9d03a80257c34883f57cf0b/crates/egui/src/lib.rs#L557-L575)
//! ∞⊗⎗⎘⎙⏏⏴⏵⏶⏷
//! ⏩⏪⏭⏮⏸⏹⏺■▶📾🔀🔁🔃
//! ☀☁★☆☐☑☜☝☞☟⛃⛶✔
//! ↺↻⟲⟳⬅➡⬆⬇⬈⬉⬊⬋⬌⬍⮨⮩⮪⮫
//! ♡
//! 📅📆
//! 📈📉📊
//! 📋📌📎📤📥🔆
//! 🔈🔉🔊🔍🔎🔗🔘
//! 🕓🖧... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/pcr.rs | src/gui/pcr.rs | use std::str::FromStr;
use eframe::egui::{Color32, ComboBox, Grid, RichText, TextEdit, Ui, Vec2};
use crate::{
gui::{
COL_SPACING, ROW_SPACING, lin_maps,
theme::{COLOR_ACTION, COLOR_INFO},
},
pcr::{PcrUi, PolymeraseType, TempTime, make_amplicon_tab},
primer::{Primer, PrimerDirection, T... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/save.rs | src/gui/save.rs | //! GUI code for saving and loading. Calls business logic in `file_io/save.rs`.
use std::{env, path::Path};
use eframe::egui::Ui;
use egui_file_dialog::FileDialog;
use crate::{
file_io::{
genbank::export_genbank,
save,
save::{StateToSave, export_fasta, load_import},
snapgene::expo... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/portions.rs | src/gui/portions.rs | //! UI page for mixing portions. (growth media, stock solutions etc)
use eframe::{
egui,
egui::{Color32, ComboBox, RichText, TextEdit, Ui},
};
use crate::{
gui::{
COL_SPACING, ROW_SPACING,
theme::{COLOR_ACTION, COLOR_INFO},
},
portions::{
MediaPrepInput, PlateSize, Portions... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/feature_table.rs | src/gui/feature_table.rs | //! GUI code for the features editor and related.
use eframe::egui::{
Color32, ComboBox, CursorIcon, Frame, RichText, ScrollArea, Stroke, TextEdit, Ui,
};
use crate::{
Color, Selection,
gui::{COL_SPACING, ROW_SPACING, int_field, theme::COLOR_ACTION},
misc_types::{
Feature,
FeatureDirec... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/metadata.rs | src/gui/metadata.rs | //! Contains references, comments, etc about the plasmid.
use chrono::NaiveDate;
use eframe::egui::{Color32, RichText, ScrollArea, TextEdit, Ui};
use crate::{
gui::{COL_SPACING, ROW_SPACING},
misc_types::Metadata,
};
const WIDTH_RATIO: f32 = 0.6;
const ROW_HEIGHT: usize = 1;
const HEADING_COLOR: Color32 = C... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/cloning.rs | src/gui/cloning.rs | use core::fmt;
use std::borrow::Cow;
use eframe::egui::{
Color32, ComboBox, Frame, Grid, RichText, ScrollArea, Stroke, TextEdit, Ui, Vec2,
};
use na_seq::{Nucleotide, insert_into_seq, seq_from_str, seq_to_str_lower};
use strum::IntoEnumIterator;
use crate::{
backbones::{Backbone, BackboneFilters, CloningTechn... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/ab1.rs | src/gui/ab1.rs | //! Contains code for viewing AB1 sequencing data, e.g. from Sanger sequencing.
use bio_files::SeqRecordAb1;
use copypasta::{ClipboardContext, ClipboardProvider};
use eframe::{
egui::{
Align2, Color32, FontFamily, FontId, Frame, Pos2, Rect, RichText, Sense, Shape, Slider,
Stroke, Ui, pos2, vec2,
... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/input.rs | src/gui/input.rs | //! Code related to mouse and keyboard input handling.
use std::{mem, path::PathBuf};
use eframe::egui::{Event, InputState, Key, PointerButton, Ui};
use na_seq::{Nucleotide, seq_from_str};
use crate::{
StateUi,
file_io::{
save,
save::{QUICKSAVE_FILE, StateToSave, load_import},
},
gui:... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/sequence/primer_overlay.rs | src/gui/sequence/primer_overlay.rs | //! This module contains code related to drawing primer arrows in the sequence view.
use eframe::egui::{Pos2, Shape, Ui};
use crate::{
Selection,
gui::sequence::{feature_overlay, seq_view::SeqViewData},
misc_types::FeatureType,
primer::{Primer, PrimerDirection},
util,
util::RangeIncl,
};
pub ... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/sequence/seq_view.rs | src/gui/sequence/seq_view.rs | //! This module contains GUI code related to the sequence visulization.
use eframe::{
egui::{
Align2, Color32, FontFamily, FontId, Frame, Pos2, Rect, ScrollArea, Sense, Shape, Stroke,
Ui, pos2, vec2,
},
emath::RectTransform,
epaint::PathStroke,
};
use na_seq::amino_acids::{AminoAcid, Co... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/sequence/mod.rs | src/gui/sequence/mod.rs | //! This module contains GUI code related to the sequence view.
use eframe::egui::{Color32, Frame, RichText, ScrollArea, TextEdit, Ui, text::CursorRange};
use na_seq::{seq_complement, seq_from_str, seq_to_str_lower};
// todo: monospace font for all seqs.
use crate::gui::{COL_SPACING, ROW_SPACING};
// todo: monospace ... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
David-OConnor/plascad | https://github.com/David-OConnor/plascad/blob/717459dcd780ec4266e9a2aa15297eae31956da5/src/gui/sequence/feature_overlay.rs | src/gui/sequence/feature_overlay.rs | //! This module is related to drawing features on the sequence view. It is similar to `primer_overlay`.
// todo: Abstract out diffs between this and the primer arrow; avoid repeated code.
use std::mem;
use eframe::{
egui::{Align2, Color32, FontFamily, FontId, Pos2, Shape, Stroke, Ui, pos2},
epaint::PathShape... | rust | MIT | 717459dcd780ec4266e9a2aa15297eae31956da5 | 2026-01-04T20:22:11.154589Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/build.rs | ext/build.rs | use std::{
env,
error::Error,
fs::{create_dir_all, File},
io::{Read, Write},
path::PathBuf,
};
fn main() -> Result<(), Box<dyn Error>> {
// Propogate linking from rb-sys for usage in the wasmtime-rb Rust crate
let _ = rb_sys_env::activate()?;
bundle_ruby_file("lib/wasmtime/error.rb")?;... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/lib.rs | ext/src/lib.rs | #![allow(clippy::doc_lazy_continuation)]
use magnus::{Error, Ruby};
mod helpers;
mod ruby_api;
pub(crate) use ruby_api::*;
rb_sys::set_global_tracking_allocator!();
#[magnus::init]
pub fn init(ruby: &Ruby) -> Result<(), Error> {
#[cfg(ruby_gte_3_0)]
unsafe {
rb_sys::rb_ext_ractor_safe(true);
}
... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/config.rs | ext/src/ruby_api/config.rs | use crate::{define_rb_intern, helpers::SymbolEnum, PoolingAllocationConfig};
use lazy_static::lazy_static;
use magnus::{
prelude::*, r_hash::ForEach, try_convert, typed_data::Obj, Error, RHash, Ruby, Symbol,
TryConvert, Value,
};
use std::{
convert::{TryFrom, TryInto},
ops::Deref,
sync::Arc,
};
use ... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/errors.rs | ext/src/ruby_api/errors.rs | use crate::ruby_api::root;
use magnus::{error::ErrorType, value::Lazy, Error, ExceptionClass, Module, Ruby};
use std::borrow::Cow;
/// Base error class for all Wasmtime errors.
pub fn base_error() -> ExceptionClass {
static ERR: Lazy<ExceptionClass> = Lazy::new(|_| root().const_get("Error").unwrap());
let ruby... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/func.rs | ext/src/ruby_api/func.rs | use super::{
convert::{ToRubyValue, ToSym, ToValTypeVec, ToWasmVal},
engine,
errors::result_error,
params::Params,
root,
store::{Store, StoreContextValue, StoreData},
};
use crate::{error, Caller};
use magnus::{
block::Proc, class, function, gc::Marker, method, prelude::*, scan_args::scan_ar... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/engine.rs | ext/src/ruby_api/engine.rs | use super::{config::hash_to_config, root};
use crate::{
error,
helpers::{nogvl, Tmplock},
};
use magnus::{
class, function, method, prelude::*, scan_args, typed_data::Obj, value::LazyId, Error, Module,
Object, RHash, RString, Ruby, TryConvert, Value,
};
use std::{
collections::hash_map::DefaultHashe... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/global.rs | ext/src/ruby_api/global.rs | use super::{
convert::{ToRubyValue, ToSym, ToValType, ToWasmVal},
root,
store::{Store, StoreContextValue},
};
use crate::error;
use magnus::{
class, function, gc::Marker, method, prelude::*, typed_data::Obj, DataTypeFunctions, Error,
Object, Ruby, Symbol, TypedData, Value,
};
use wasmtime::{Extern, ... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/wasi.rs | ext/src/ruby_api/wasi.rs | use crate::{ruby_api::component, Linker};
use super::root;
use magnus::{class, function, typed_data::Obj, Error, Module, Object, RModule, Ruby};
#[magnus::wrap(class = "Wasmtime::WASI::P1", free_immediately)]
struct P1;
impl P1 {
pub fn add_to_linker_sync(linker: Obj<Linker>) -> Result<(), Error> {
linke... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/store.rs | ext/src/ruby_api/store.rs | use super::errors::wasi_exit_error;
use super::{caller::Caller, engine::Engine, root, trap::Trap};
use crate::{define_rb_intern, error, WasiConfig};
use magnus::value::StaticSymbol;
use magnus::{
class, function,
gc::{Compactor, Marker},
method, scan_args,
typed_data::Obj,
value::Opaque,
DataTyp... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/convert.rs | ext/src/ruby_api/convert.rs | use crate::{define_rb_intern, err, error, helpers::SymbolEnum};
use lazy_static::lazy_static;
use magnus::{
prelude::*, try_convert, Error, IntoValue, RArray, Ruby, Symbol, TryConvert, TypedData, Value,
};
use wasmtime::{ExternRef, RefType, Val, ValType};
use super::{
func::{Func, FuncType},
global::{Globa... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/caller.rs | ext/src/ruby_api/caller.rs | use super::{convert::WrapWasmtimeType, externals::Extern, root, store::StoreData};
use crate::error;
use magnus::{class, method, typed_data::Obj, Error, Module as _, RString, Ruby, Value};
use std::cell::UnsafeCell;
use wasmtime::{AsContext, AsContextMut, Caller as CallerImpl, StoreContext, StoreContextMut};
/// A han... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/module.rs | ext/src/ruby_api/module.rs | use std::{
mem::{transmute, MaybeUninit},
ops::Deref,
os::raw::c_void,
};
use super::{
convert::{WrapWasmtimeExternType, WrapWasmtimeType},
engine::Engine,
root,
};
use crate::{
error,
helpers::{nogvl, Tmplock},
};
use magnus::{
class, function, method, rb_sys::AsRawValue, typed_dat... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/params.rs | ext/src/ruby_api/params.rs | use super::{convert::ToWasmVal, errors::ExceptionMessage, store::StoreContextValue};
use magnus::{error::ErrorType, Error, Ruby, Value};
use static_assertions::assert_eq_size;
use wasmtime::{FuncType, ValType};
#[derive(Debug, Clone)]
#[repr(C)]
struct Param {
val: Value,
index: u32,
ty: ValType,
}
impl P... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/externals.rs | ext/src/ruby_api/externals.rs | use super::{
convert::{WrapWasmtimeExternType, WrapWasmtimeType},
func::{Func, FuncType},
global::{Global, GlobalType},
memory::{Memory, MemoryType},
root,
store::StoreContextValue,
table::{Table, TableType},
};
use crate::{conversion_err, not_implemented};
use magnus::{
class, gc::Marke... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/memory.rs | ext/src/ruby_api/memory.rs | mod unsafe_slice;
use self::unsafe_slice::UnsafeSlice;
use super::{
root,
store::{Store, StoreContextValue},
};
use crate::{define_rb_intern, error};
use magnus::{
class, function, gc::Marker, method, r_string::RString, scan_args, typed_data::Obj,
DataTypeFunctions, Error, Module as _, Object, Ruby, Ty... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/table.rs | ext/src/ruby_api/table.rs | use super::{
convert::{ToRubyValue, ToSym, ToValType, ToWasmVal},
root,
store::{Store, StoreContextValue},
};
use crate::{define_rb_intern, error};
use magnus::{
class, function, gc::Marker, method, prelude::*, scan_args, typed_data::Obj, DataTypeFunctions,
Error, IntoValue, Object, Ruby, Symbol, T... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/trap.rs | ext/src/ruby_api/trap.rs | use std::convert::TryFrom;
use crate::ruby_api::{errors::base_error, root};
use magnus::Error;
use magnus::{
method, prelude::*, rb_sys::AsRawValue, typed_data::Obj, value::Lazy, DataTypeFunctions,
ExceptionClass, IntoValue, Ruby, Symbol, TypedData,
};
pub fn trap_error() -> ExceptionClass {
static ERR: L... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/mod.rs | ext/src/ruby_api/mod.rs | #![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::invalid_html_tags)]
#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::invalid_rust_codeblocks)]
// The `pub use` imports below need to be publicly exposed when the ruby_api
// feature is enabled, else they must be publicly exposed to the crate only
// (`pub(cra... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/linker.rs | ext/src/ruby_api/linker.rs | use super::{
convert::WrapWasmtimeType,
convert::{ToExtern, ToValTypeVec},
engine::Engine,
externals::Extern,
func::{self, Func},
instance::Instance,
module::Module,
root,
store::{Store, StoreContextValue, StoreData},
};
use crate::{err, error, ruby_api::errors};
use magnus::{
bl... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/wasi_config.rs | ext/src/ruby_api/wasi_config.rs | use super::root;
use crate::error;
use crate::helpers::OutputLimitedBuffer;
use crate::ruby_api::convert::ToValType;
use crate::{define_rb_intern, helpers::SymbolEnum};
use lazy_static::lazy_static;
use magnus::{
class, function, gc::Marker, method, typed_data::Obj, value::Opaque, DataTypeFunctions, Error,
Into... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/pooling_allocation_config.rs | ext/src/ruby_api/pooling_allocation_config.rs | use lazy_static::lazy_static;
use std::cell::RefCell;
use magnus::{
class, function, method, rb_sys::AsRawValue, typed_data::Obj, value::ReprValue, Error, Module,
Object as _, Ruby, Value,
};
use rb_sys::{ruby_special_consts::RUBY_Qtrue, VALUE};
use wasmtime::{Enabled, PoolingAllocationConfig as PoolingAllocat... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/instance.rs | ext/src/ruby_api/instance.rs | use super::{
convert::{ToExtern, WrapWasmtimeType},
func::Func,
module::Module,
root,
store::{Store, StoreContextValue, StoreData},
};
use crate::err;
use magnus::{
class, function, gc::Marker, method, prelude::*, scan_args, typed_data::Obj, DataTypeFunctions,
Error, Object, RArray, RHash, R... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/component.rs | ext/src/ruby_api/component.rs | mod convert;
mod func;
mod instance;
mod linker;
mod wasi_command;
use super::root;
use magnus::{
class::{self, RClass},
function, method,
prelude::*,
r_string::RString,
typed_data::Obj,
value::Lazy,
Error, Module, Object, RModule, Ruby,
};
use rb_sys::tracking_allocator::ManuallyTracked;
u... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/memory/unsafe_slice.rs | ext/src/ruby_api/memory/unsafe_slice.rs | use crate::{define_rb_intern, error, root, Memory};
use magnus::{
class,
gc::Marker,
method,
rb_sys::{AsRawId, AsRawValue, FromRawValue},
typed_data::Obj,
value::{IntoId, Lazy, Opaque},
Class, DataTypeFunctions, Error, Module as _, Ruby, TryConvert, TypedData, Value,
};
#[cfg(ruby_gte_3_0)]
... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/component/func.rs | ext/src/ruby_api/component/func.rs | use crate::ruby_api::{
component::{
convert::{component_val_to_rb, rb_to_component_val},
Instance,
},
errors::ExceptionMessage,
store::{Store, StoreContextValue},
};
use magnus::{
class, gc::Marker, method, prelude::*, typed_data::Obj, value, DataTypeFunctions, Error,
IntoValue, ... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/component/convert.rs | ext/src/ruby_api/component/convert.rs | use crate::ruby_api::component::component_namespace;
use crate::ruby_api::errors::ExceptionMessage;
use crate::ruby_api::store::StoreContextValue;
use crate::{define_rb_intern, err, error, not_implemented};
use magnus::rb_sys::AsRawValue;
use magnus::value::{IntoId, Lazy, ReprValue};
use magnus::{
prelude::*, try_c... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/component/wasi_command.rs | ext/src/ruby_api/component/wasi_command.rs | use magnus::{
class, function, method, module::Module, typed_data::Obj, DataTypeFunctions, Error, Object,
RModule, Ruby,
};
use wasmtime_wasi::p2::bindings::sync::Command;
use crate::{
err, error,
ruby_api::{
component::{linker::Linker, Component},
errors,
},
Store,
};
#[magnus... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/component/linker.rs | ext/src/ruby_api/component/linker.rs | use super::{Component, Instance};
use crate::{
err,
ruby_api::{
errors,
store::{StoreContextValue, StoreData},
Engine, Module, Store,
},
};
use std::{
borrow::BorrowMut,
cell::{RefCell, RefMut},
};
use crate::error;
use magnus::{
class, function, gc::Marker, method, r_st... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/ruby_api/component/instance.rs | ext/src/ruby_api/component/instance.rs | use crate::ruby_api::{component::Func, Store};
use std::{borrow::BorrowMut, cell::RefCell};
use crate::error;
use magnus::{
class,
error::ErrorType,
function,
gc::Marker,
method,
prelude::*,
r_string::RString,
scan_args,
typed_data::Obj,
value::{self, ReprValue},
DataTypeFun... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/symbol_enum.rs | ext/src/helpers/symbol_enum.rs | use super::static_id::StaticId;
use magnus::{prelude::*, Error, Ruby, Symbol, TryConvert, Value};
use std::fmt::Display;
/// Represents an enum as a set of Symbols (using `StaticId`).
/// Each symbol maps to a value of the enum's type.
pub struct SymbolEnum<'a, T: Clone> {
what: &'a str,
mapping: Mapping<T>,
}... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/output_limited_buffer.rs | ext/src/helpers/output_limited_buffer.rs | use bytes::Bytes;
use magnus::{
value::{InnerValue, Opaque, ReprValue},
RString, Ruby,
};
use std::io::Write;
use std::sync::{Arc, Mutex};
use tokio::io::AsyncWrite;
use wasmtime_wasi::cli::{IsTerminal, StdoutStream};
use wasmtime_wasi::p2::{OutputStream, Pollable, StreamError, StreamResult};
/// A buffer that... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/tmplock.rs | ext/src/helpers/tmplock.rs | use magnus::{
rb_sys::{protect, AsRawValue},
RString,
};
pub trait Tmplock {
fn as_locked_slice(&self) -> Result<(&[u8], TmplockGuard), magnus::Error>;
fn as_locked_str(&self) -> Result<(&str, TmplockGuard), magnus::Error>;
}
#[derive(Debug)]
#[repr(transparent)]
pub struct TmplockGuard {
raw: rb_... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/macros.rs | ext/src/helpers/macros.rs | /// A macro to define a new `Id` const for a given string.
#[macro_export]
macro_rules! define_rb_intern {
($($name:ident => $id:expr,)*) => {
$(
lazy_static::lazy_static! {
/// Define a Ruby internal `Id`. Equivalent to `rb_intern("$name")`
pub static ref $name: ... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/mod.rs | ext/src/helpers/mod.rs | mod macros;
mod nogvl;
mod output_limited_buffer;
mod static_id;
mod symbol_enum;
mod tmplock;
pub use nogvl::nogvl;
pub use output_limited_buffer::OutputLimitedBuffer;
pub use static_id::StaticId;
pub use symbol_enum::SymbolEnum;
pub use tmplock::Tmplock;
| rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/static_id.rs | ext/src/helpers/static_id.rs | use magnus::rb_sys::{AsRawId, FromRawId};
use magnus::{
value::{Id, IntoId},
Ruby, Symbol,
};
use std::convert::TryInto;
use std::num::NonZeroUsize;
/// A static `Id` that can be used to refer to a Ruby ID.
///
/// Use `define_rb_intern!` to define it so that it will be cached in a global variable.
///
/// Mag... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/ext/src/helpers/nogvl.rs | ext/src/helpers/nogvl.rs | use std::{ffi::c_void, mem::MaybeUninit, ptr::null_mut};
use rb_sys::rb_thread_call_without_gvl;
unsafe extern "C" fn call_without_gvl<F, R>(arg: *mut c_void) -> *mut c_void
where
F: FnMut() -> R,
R: Sized,
{
let arg = arg as *mut (&mut F, &mut MaybeUninit<R>);
let (func, result) = unsafe { &mut *arg ... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/spec/fixtures/wasi-fs/src/main.rs | spec/fixtures/wasi-fs/src/main.rs | use std::io::{Write, Read};
use std::fs::File;
fn main() {
let args: Vec<String> = std::env::args().collect();
let counter_file = File::open(&args[1]).expect("failed to open counter file");
let mut counter_str = String::new();
counter_file.take(100).read_to_string(&mut counter_str)
.expect("f... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/spec/fixtures/component-types/src/lib.rs | spec/fixtures/component-types/src/lib.rs | #[allow(warnings)]
mod bindings;
use bindings::exports::resource;
use bindings::Guest;
use paste::paste;
macro_rules! id_function {
($wasm_ty:ident, $rust_ty:ty) => {
paste! {
fn [<id_ $wasm_ty>](v: $rust_ty) -> $rust_ty {
v
}
}
};
}
struct WrappedStrin... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/spec/fixtures/wasi-debug/src/main.rs | spec/fixtures/wasi-debug/src/main.rs | use miniserde::{json, Serialize};
use std::io::{Write, Read};
#[derive(Serialize)]
struct Wasi {
args: Vec<String>,
env: Vec<(String, String)>,
pwd: String,
stdin: String,
}
#[derive(Serialize)]
struct Log<'a> {
name: &'static str,
wasi: &'a Wasi,
}
fn main() {
let args: Vec<String> = std... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
bytecodealliance/wasmtime-rb | https://github.com/bytecodealliance/wasmtime-rb/blob/4bd163735452f44ee6e7066516ce63595df1e29b/spec/fixtures/wasi-deterministic/src/main.rs | spec/fixtures/wasi-deterministic/src/main.rs | // In a determinisitc build, the output of this program should be the same
// for every execution.
//
// This program generates random numbers, sleeps for 2 seconds,
// and prints to stdout and stderr.
//
// Expected Output:
//
// stdout: json string with the following keys:
// - Random numbers: rang1, rang2, rang... | rust | Apache-2.0 | 4bd163735452f44ee6e7066516ce63595df1e29b | 2026-01-04T20:22:01.008503Z | false |
SeismicSystems/seismic-reth | https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/bin/seismic-reth/src/main.rs | bin/seismic-reth/src/main.rs | #![allow(missing_docs)]
use std::net::SocketAddr;
use clap::Parser;
use jsonrpsee_http_client::HttpClientBuilder;
use reth::cli::Cli;
use reth_cli_commands::node::NoArgs;
use reth_node_core::node_config::NodeConfig;
use reth_seismic_cli::chainspec::SeismicChainSpecParser;
use reth_seismic_node::node::SeismicNode;
use... | rust | Apache-2.0 | 62834bd8deb86513778624a3ba33f55f4d6a1471 | 2026-01-04T20:20:17.218210Z | false |
SeismicSystems/seismic-reth | https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/bin/reth/src/lib.rs | bin/reth/src/lib.rs | //! Rust Ethereum (reth) binary executable.
//!
//! ## Feature Flags
//!
//! - `jemalloc`: Uses [jemallocator](https://github.com/tikv/jemallocator) as the global allocator.
//! This is **not recommended on Windows**. See [here](https://rust-lang.github.io/rfcs/1974-global-allocators.html#jemalloc)
//! for more inf... | rust | Apache-2.0 | 62834bd8deb86513778624a3ba33f55f4d6a1471 | 2026-01-04T20:20:17.218210Z | false |
SeismicSystems/seismic-reth | https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/bin/reth/src/ress.rs | bin/reth/src/ress.rs | use reth_ethereum_primitives::EthPrimitives;
use reth_evm::ConfigureEvm;
use reth_network::{protocol::IntoRlpxSubProtocol, NetworkProtocols};
use reth_network_api::FullNetwork;
use reth_node_api::ConsensusEngineEvent;
use reth_node_core::args::RessArgs;
use reth_provider::providers::{BlockchainProvider, ProviderNodeTyp... | rust | Apache-2.0 | 62834bd8deb86513778624a3ba33f55f4d6a1471 | 2026-01-04T20:20:17.218210Z | false |
SeismicSystems/seismic-reth | https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/bin/reth/src/main.rs | bin/reth/src/main.rs | #![allow(missing_docs)]
#[global_allocator]
static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator();
use clap::Parser;
use reth::{args::RessArgs, cli::Cli, ress::install_ress_subprotocol};
use reth_ethereum_cli::chainspec::EthereumChainSpecParser;
use reth_node_builder::NodeHandl... | rust | Apache-2.0 | 62834bd8deb86513778624a3ba33f55f4d6a1471 | 2026-01-04T20:20:17.218210Z | false |
SeismicSystems/seismic-reth | https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/bin/reth/src/cli/mod.rs | bin/reth/src/cli/mod.rs | //! CLI definition and entrypoint to executable
/// Re-export of the [`reth_node_core`] types specifically in the `cli` module.
///
/// This is re-exported because the types in `reth_node_core::cli` originally existed in
/// `reth::cli` but were moved to the [`reth_node_core`] crate. This re-export avoids a
/// breaki... | rust | Apache-2.0 | 62834bd8deb86513778624a3ba33f55f4d6a1471 | 2026-01-04T20:20:17.218210Z | false |
SeismicSystems/seismic-reth | https://github.com/SeismicSystems/seismic-reth/blob/62834bd8deb86513778624a3ba33f55f4d6a1471/bin/reth-bench/src/valid_payload.rs | bin/reth-bench/src/valid_payload.rs | //! This is an extension trait for any provider that implements the engine API, to wait for a VALID
//! response. This is useful for benchmarking, as it allows us to wait for a payload to be valid
//! before sending additional calls.
use alloy_eips::eip7685::Requests;
use alloy_provider::{ext::EngineApi, network::AnyR... | rust | Apache-2.0 | 62834bd8deb86513778624a3ba33f55f4d6a1471 | 2026-01-04T20:20:17.218210Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.