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
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/assets/example.rs
examples/assets/example.rs
fn main() { println!("That will only work with the right plugin in your $PATH!"); println!("Checkout the `external_data_loader` Rust example."); }
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_data_loader/build.rs
examples/rust/custom_data_loader/build.rs
fn main() { re_build_tools::export_build_info_vars_for_crate("custom_data_loader"); }
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_data_loader/src/main.rs
examples/rust/custom_data_loader/src/main.rs
//! This example demonstrates how to implement and register a [`re_data_loader::DataLoader`] into //! the Rerun Viewer in order to add support for loading arbitrary files. //! //! Usage: //! ```sh //! $ cargo r -p custom_data_loader -- path/to/some/file //! ``` use rerun::external::{anyhow, re_build_info, re_data_load...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/log_file/src/main.rs
examples/rust/log_file/src/main.rs
//! Demonstrates how to log any file from the SDK using the `DataLoader` machinery. //! //! See <https://www.rerun.io/docs/reference/data-loaders/overview> for more information. //! //! Usage: //! ``` //! cargo run -p log_file -- examples/assets //! ``` use rerun::external::re_log; #[derive(Debug, clap::Parser)] #[cl...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/lenses/src/main.rs
examples/rust/lenses/src/main.rs
use std::sync::Arc; use arrow::array::{ Array, ArrayBuilder, Float32Array, Float64Array, Int64Builder, ListArray, ListBuilder, StringArray, StringBuilder, StructArray, }; use arrow::datatypes::{DataType, Field}; use rerun::external::re_log; use rerun::lenses::{Lens, LensesSink, Op}; use rerun::sink::GrpcSink; ...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/graph_lattice/src/main.rs
examples/rust/graph_lattice/src/main.rs
//! Shows how to draw a graph with various node properties. //! //! Usage: //! ``` //! cargo run -p graph_lattice -- --connect //! ``` use itertools::Itertools as _; use rerun::external::re_log; use rerun::{Color, GraphEdges, GraphNodes}; #[derive(Debug, clap::Parser)] #[clap(author, version, about)] pub struct Args...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/objectron/build.rs
examples/rust/objectron/build.rs
use std::path::PathBuf; use re_build_tools::write_file_if_necessary; fn should_run() -> bool { #![expect(clippy::match_same_arms)] use re_build_tools::Environment; match Environment::detect() { // The code (which is committed) should hopefully already be up-to-date. Environment::Publishin...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/objectron/src/objectron.rs
examples/rust/objectron/src/objectron.rs
// This file was autogenerated by `build.rs`. Do not edit. #![expect(clippy::all, clippy::doc_markdown)] // This file is @generated by prost-build. /// Info about the camera characteristics used to capture images and depth data. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AvCameraCalibrationData { ///...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
true
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/objectron/src/main.rs
examples/rust/objectron/src/main.rs
//! Example of using the Rerun SDK to log [the Objectron dataset](https://github.com/google-research-datasets/Objectron). //! //! Usage: //! ```sh //! cargo run -p objectron //! ``` //! or: //! ```sh //! cargo run -p objectron -- --recording chair //! ``` use std::collections::HashMap; use std::io::Read; use std::path...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/app.rs
examples/rust/custom_callback/src/app.rs
//! The external application that will be controlled by the extended viewer ui. use core::f32; use std::f32::consts::{PI, TAU}; use custom_callback::comms::app::ControlApp; use custom_callback::comms::protocol::Message; use rerun::RecordingStream; use rerun::external::glam::Vec3; use rerun::external::{re_log, tokio};...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/lib.rs
examples/rust/custom_callback/src/lib.rs
pub mod comms; pub mod panel;
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/panel.rs
examples/rust/custom_callback/src/panel.rs
use std::time::Instant; use rerun::external::egui::{self, ScrollArea}; use rerun::external::re_log::ResultExt; use rerun::external::re_ui::{UiExt, list_item}; use rerun::external::{eframe, re_viewer}; use crate::comms::protocol::Message; use crate::comms::viewer::ControlViewerHandle; #[derive(Default)] pub struct Co...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/viewer.rs
examples/rust/custom_callback/src/viewer.rs
use custom_callback::comms::viewer::ControlViewer; use custom_callback::panel::Control; use rerun::external::{eframe, re_crash_handler, re_grpc_server, re_log, re_memory, re_viewer}; // By using `re_memory::AccountingAllocator` Rerun can keep track of exactly how much memory it is using, // and prune the data store wh...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/comms/app.rs
examples/rust/custom_callback/src/comms/app.rs
use std::error::Error; use std::result::Result; use std::sync::Arc; use parking_lot::RwLock; use rerun::external::{re_error, re_log}; use tokio::io::{AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf}; use tokio::net::{TcpListener, TcpSocket, TcpStream}; use tokio::sync::Mutex; use tokio::sync::mpsc::{UnboundedReceiver...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/comms/mod.rs
examples/rust/custom_callback/src/comms/mod.rs
pub mod app; pub mod protocol; pub mod viewer;
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/comms/protocol.rs
examples/rust/custom_callback/src/comms/protocol.rs
use std::io::{self, ErrorKind}; use serde::{Deserialize, Serialize}; /// Messages that can be sent between the client and server. #[derive(Serialize, Deserialize, Debug, Clone)] pub enum Message { Point3d { path: String, position: (f32, f32, f32), radius: f32, }, Box3d { pa...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_callback/src/comms/viewer.rs
examples/rust/custom_callback/src/comms/viewer.rs
use std::collections::VecDeque; use std::sync::Arc; use std::time::Duration; use rerun::external::{re_error, re_log}; use tokio::io::{AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf}; use tokio::net::TcpStream; use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel}; use tokio::sync::{Mutex, No...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/stdio/src/main.rs
examples/rust/stdio/src/main.rs
//! Demonstrates how to log data to standard output with the Rerun SDK, and then visualize it //! from standard input with the Rerun Viewer. //! //! Usage: //! ```text //! echo 'hello from stdin!' | cargo run | rerun - //! ``` fn main() -> Result<(), Box<dyn std::error::Error>> { let rec = rerun::RecordingStreamBu...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/spawn_viewer/src/main.rs
examples/rust/spawn_viewer/src/main.rs
//! Spawn a new Rerun Viewer process ready to listen for gRPC connections. fn main() -> Result<(), Box<dyn std::error::Error>> { rerun::spawn(&rerun::SpawnOptions::default())?; Ok(()) }
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/raw_mesh/src/main.rs
examples/rust/raw_mesh/src/main.rs
//! This example demonstrates how to use the Rerun Rust SDK to log raw 3D meshes (so-called //! "triangle soups") and their transform hierarchy. //! //! Note that while this example loads GLTF meshes to illustrate //! [`Mesh3D`](https://rerun.io/docs/reference/types/archetypes/mesh3d)'s abilitites, //! you can also sen...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/minimal_serve/src/main.rs
examples/rust/minimal_serve/src/main.rs
//! Demonstrates the most barebone usage of the Rerun SDK. use rerun::demo_util::grid; use rerun::external::glam; fn main() -> Result<(), Box<dyn std::error::Error>> { let rec = rerun::RecordingStreamBuilder::new("rerun_example_minimal_serve").serve_grpc()?; rerun::serve_web_viewer(rerun::web_viewer::WebView...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/dataframe_query/src/main.rs
examples/rust/dataframe_query/src/main.rs
//! Demonstrates basic usage of the dataframe APIs. use itertools::Itertools; use rerun::ChunkStoreConfig; use rerun::dataframe::{QueryEngine, QueryExpression, SparseFillStrategy, TimelineName}; use rerun::external::arrow; use rerun::external::re_arrow_util::format_record_batch; fn main() -> Result<(), Box<dyn std::e...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/extend_viewer_ui/src/main.rs
examples/rust/extend_viewer_ui/src/main.rs
//! This example shows how to wrap the Rerun Viewer in your own GUI. use rerun::external::{ arrow, eframe, egui, re_chunk_store, re_crash_handler, re_entity_db, re_grpc_server, re_log, re_log_types, re_memory, re_sdk_types, re_viewer, tokio, }; // By using `re_memory::AccountingAllocator` Rerun can keep track...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/minimal_options/src/main.rs
examples/rust/minimal_options/src/main.rs
//! Demonstrates how to accept arguments and connect to running rerun servers. //! //! Usage: //! ``` //! cargo run -p minimal_options -- --help //! ``` use rerun::demo_util::grid; use rerun::external::re_log; #[derive(Debug, clap::Parser)] #[clap(author, version, about)] struct Args { #[command(flatten)] re...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_store_subscriber/build.rs
examples/rust/custom_store_subscriber/build.rs
fn main() { re_build_tools::export_build_info_vars_for_crate("custom_store_subscriber"); }
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_store_subscriber/src/main.rs
examples/rust/custom_store_subscriber/src/main.rs
//! This example demonstrates how to use [`ChunkStoreSubscriber`]s and [`ChunkStoreEvent`]s to implement both //! custom secondary indices and trigger systems. //! //! Usage: //! ```sh //! # Start the Rerun Viewer with our custom view in a terminal: //! $ cargo r -p custom_store_subscriber //! //! # Log any kind of dat...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/minimal/src/main.rs
examples/rust/minimal/src/main.rs
//! Demonstrates the most barebone usage of the Rerun SDK. use rerun::demo_util::grid; use rerun::external::glam; fn main() -> Result<(), Box<dyn std::error::Error>> { let rec = rerun::RecordingStreamBuilder::new("rerun_example_minimal").spawn()?; let points = grid(glam::Vec3::splat(-10.0), glam::Vec3::splat...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/shared_recording/src/main.rs
examples/rust/shared_recording/src/main.rs
//! Demonstrates how to use `RecordingId`s to build a single recording from multiple processes. fn main() -> Result<(), Box<dyn std::error::Error>> { let rec = rerun::RecordingStreamBuilder::new("rerun_example_shared_recording") .recording_id("my_shared_recording") .spawn()?; rec.log( ...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/external_data_loader/src/main.rs
examples/rust/external_data_loader/src/main.rs
//! Example of an external data-loader executable plugin for the Rerun Viewer. use rerun::EXTERNAL_DATA_LOADER_INCOMPATIBLE_EXIT_CODE; // The Rerun Viewer will always pass at least these two pieces of information: // 1. The path to be loaded, as a positional arg. // 2. A shared recording ID, via the `--recording-id` ...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/viewer_callbacks/src/main.rs
examples/rust/viewer_callbacks/src/main.rs
//! This example shows how to wrap the Rerun Viewer in your own GUI. use std::rc::Rc; use std::sync::Arc; use rerun::external::parking_lot::Mutex; use rerun::external::re_viewer::{self, ViewerEvent, ViewerEventKind}; use rerun::external::{eframe, egui, re_crash_handler, re_grpc_server, re_log, re_memory, tokio}; // ...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/template/src/main.rs
examples/rust/template/src/main.rs
//! Example template. fn main() -> Result<(), Box<dyn std::error::Error>> { let rec = rerun::RecordingStreamBuilder::new("rerun_example_my_example_name").spawn()?; // … example code _ = rec; Ok(()) }
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/mcap_protobuf/src/main.rs
examples/rust/mcap_protobuf/src/main.rs
use arrow::array::{Float32Array, Float64Array, ListArray, UInt32Array}; // `re_arrow_combinators` provides the building blocks from which we compose the conversions. use re_arrow_combinators::{ Transform as _, cast::{ListToFixedSizeList, PrimitiveCast}, map::MapFixedSizeList, map::MapList, reshape::...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/dna/src/main.rs
examples/rust/dna/src/main.rs
//! The example from our Getting Started page. use std::f32::consts::TAU; use itertools::Itertools as _; use rand::Rng as _; use rerun::demo_util::{bounce_lerp, color_spiral}; use rerun::external::glam; const NUM_POINTS: usize = 100; fn main() -> Result<(), Box<dyn std::error::Error>> { rerun::external::re_log:...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/clock/src/main.rs
examples/rust/clock/src/main.rs
//! Builds an analog clock using Rerun's `Vector3D` primitive. //! //! This is a great benchmark for many small events. //! //! Usage: //! ``` //! cargo run -p clock -- --help //! ``` use std::f32::consts::TAU; use rerun::external::re_log; #[derive(Debug, clap::Parser)] #[clap(author, version, about)] struct Args { ...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/animated_urdf/src/main.rs
examples/rust/animated_urdf/src/main.rs
//! An example of how to load and animate a URDF given some changing joint angles. //! //! Usage: //! ``` //! cargo run -p animated_urdf //! ``` #[derive(Debug, clap::Parser)] #[clap(author, version, about)] struct Args { #[command(flatten)] rerun: rerun::clap::RerunArgs, } use rerun::components::Translation3...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_view/src/points3d_color_visualizer.rs
examples/rust/custom_view/src/points3d_color_visualizer.rs
use rerun::external::egui; use rerun::external::re_log_types::{EntityPath, Instance}; use rerun::external::re_view::{DataResultQuery, RangeResultsExt}; use rerun::external::re_viewer_context::{ IdentifiedViewSystem, RequiredComponents, ViewContext, ViewContextCollection, ViewQuery, ViewSystemExecutionError, Vie...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_view/src/points3d_color_view.rs
examples/rust/custom_view/src/points3d_color_view.rs
#![expect(clippy::disallowed_methods)] // It's just an example use rerun::external::egui; use rerun::external::re_data_ui::{DataUi, item_ui}; use rerun::external::re_entity_db::InstancePath; use rerun::external::re_log_types::EntityPath; use rerun::external::re_sdk_types::ViewClassIdentifier; use rerun::external::re_u...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/custom_view/src/main.rs
examples/rust/custom_view/src/main.rs
//! This example shows how to add custom Views to the Rerun Viewer. use rerun::external::{re_crash_handler, re_grpc_server, re_log, re_memory, re_viewer, tokio}; mod points3d_color_view; mod points3d_color_visualizer; // By using `re_memory::AccountingAllocator` Rerun can keep track of exactly how much memory it is ...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
rerun-io/rerun
https://github.com/rerun-io/rerun/blob/910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0/examples/rust/incremental_logging/src/main.rs
examples/rust/incremental_logging/src/main.rs
//! Showcase how to incrementally log data belonging to the same archetype, and re-use some or all //! of it across frames. //! //! Usage: //! ``` //! cargo run -p incremental -- --help //! ``` use rand::Rng as _; use rand::distr::Uniform; use rerun::external::re_log; #[derive(Debug, clap::Parser)] #[clap(author, ver...
rust
Apache-2.0
910b1e72ca3ceb352b0bcf0d8d7de4f6bf4d19d0
2026-01-04T15:43:37.979050Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ink/src/lib.rs
harper-ink/src/lib.rs
use harper_core::parsers::{self, Parser, PlainEnglish}; use harper_core::{Token, TokenKind}; use harper_tree_sitter::TreeSitterMasker; use tree_sitter::Node; pub struct InkParser { inner: parsers::Mask<TreeSitterMasker, PlainEnglish>, } impl InkParser { fn node_condition(n: &Node) -> bool { matches!(n...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ink/tests/run_tests.rs
harper-ink/tests/run_tests.rs
use harper_core::linting::{LintGroup, Linter}; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; use harper_ink::InkParser; /// Creates a unit test checking that the linting of a Ink document (in /// `tests_sources`) produces the expected number of lints. macro_rules! create_test { ($fil...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-wasm/src/lib.rs
harper-wasm/src/lib.rs
#![doc = include_str!("../README.md")] use std::convert::Into; use std::io::Cursor; use std::sync::Arc; use harper_core::DialectFlags; use harper_core::language_detection::is_doc_likely_english; use harper_core::linting::{LintGroup, Linter as _}; use harper_core::parsers::{IsolateEnglish, Markdown, OopsAllHeadings, P...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/config.rs
harper-ls/src/config.rs
use std::path::{Path, PathBuf}; use anyhow::{Result, bail}; use dirs::{config_dir, data_local_dir}; use globset::{Glob, GlobSet}; use harper_core::{Dialect, linting::LintGroupConfig, parsers::MarkdownOptions}; use resolve_path::PathResolveExt; use serde::{Deserialize, Serialize}; use serde_json::Value; #[derive(Debug...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/diagnostics.rs
harper-ls/src/diagnostics.rs
use std::collections::HashMap; use harper_core::linting::{Lint, Suggestion}; use harper_core::{CharStringExt, Document}; use harper_stats::RecordKind; use serde_json::Value; use tower_lsp_server::lsp_types::{ CodeAction, CodeActionKind, CodeActionOrCommand, Command, Diagnostic, NumberOrString, TextEdit, Uri, W...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/pos_conv.rs
harper-ls/src/pos_conv.rs
//! This module includes various conversions from the index-based [`Span`]s that //! Harper uses, and the Ranges that the LSP uses. use harper_core::Span; use tower_lsp_server::lsp_types::{Position, Range}; pub fn span_to_range(source: &[char], span: Span<char>) -> Range { let start = index_to_position(source, sp...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/git_commit_parser.rs
harper-ls/src/git_commit_parser.rs
use harper_core::Lrc; use harper_core::parsers::{Markdown, MarkdownOptions, Parser}; /// A Harper parser for Git commit files #[derive(Clone)] pub struct GitCommitParser { inner: Lrc<dyn Parser>, } impl GitCommitParser { pub fn new(parser: Lrc<dyn Parser>) -> Self { Self { inner: parser } } p...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/backend.rs
harper-ls/src/backend.rs
use std::collections::HashMap; use std::fs::OpenOptions; use std::io::{BufWriter, Write}; use std::path::PathBuf; use std::sync::Arc; use crate::config::Config; use crate::dictionary_io::{load_dict, save_dict}; use crate::document_state::DocumentState; use crate::git_commit_parser::GitCommitParser; use crate::ignored_...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/dictionary_io.rs
harper-ls/src/dictionary_io.rs
use harper_core::DialectFlags; use itertools::Itertools; use std::path::Path; use harper_core::spell::{Dictionary, MutableDictionary}; use harper_core::{Dialect, DictWordMetadata}; use tokio::fs::{self, File}; use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, BufReader, BufWriter, Result}; /// Save ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/ignored_lints_io.rs
harper-ls/src/ignored_lints_io.rs
use std::path::Path; use anyhow::Result; use harper_core::IgnoredLints; use tokio::{ fs::{self, File}, io::{AsyncReadExt, AsyncWriteExt, BufReader, BufWriter}, }; /// Save the contents of a dictionary to a file. /// Ensures that the path to the destination exists. pub async fn save_ignored_lints( path: im...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/document_state.rs
harper-ls/src/document_state.rs
use crate::config::{CodeActionConfig, DiagnosticSeverity}; use crate::diagnostics::{lint_to_code_actions, lints_to_diagnostics}; use crate::pos_conv::range_to_span; use harper_core::linting::{Lint, LintGroup, Linter}; use harper_core::spell::{MergedDictionary, MutableDictionary}; use harper_core::{Document, IgnoredLint...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/io_utils.rs
harper-ls/src/io_utils.rs
use anyhow::anyhow; use std::path::{Component, PathBuf}; use tower_lsp_server::{UriExt, lsp_types::Uri}; /// Rewrites a path to a filename using the same conventions as /// [Neovim's undo-files](https://neovim.io/doc/user/options.html#'undodir'). pub fn fileify_path(uri: &Uri) -> anyhow::Result<PathBuf> { let mut...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-ls/src/main.rs
harper-ls/src/main.rs
#![doc = include_str!("../README.md")] use std::io::stderr; use config::Config; use tokio::net::TcpListener; mod backend; mod config; mod diagnostics; mod dictionary_io; mod document_state; mod git_commit_parser; mod ignored_lints_io; mod io_utils; mod pos_conv; use backend::Backend; use clap::Parser; use tower_lsp_...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-python/src/lib.rs
harper-python/src/lib.rs
use harper_core::parsers::{self, Parser, PlainEnglish}; use harper_core::{Token, TokenKind}; use harper_tree_sitter::TreeSitterMasker; use tree_sitter::Node; pub struct PythonParser { /// Used to grab the text nodes. inner: parsers::Mask<TreeSitterMasker, PlainEnglish>, } impl PythonParser { fn node_condi...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-python/tests/run_tests.rs
harper-python/tests/run_tests.rs
use harper_core::linting::{LintGroup, Linter}; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; use harper_python::PythonParser; /// Creates a unit test checking Python source code parsing. macro_rules! create_test { ($filename:ident.$ext:ident, $correct_expected:expr) => { past...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/fuzz/fuzz_targets/fuzz_harper_typst.rs
fuzz/fuzz_targets/fuzz_harper_typst.rs
#![no_main] use harper_core::parsers::StrParser; use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &str| { let typst = harper_typst::Typst; let _res = typst.parse_str(data); });
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/fuzz/fuzz_targets/fuzz_harper_core_markdown.rs
fuzz/fuzz_targets/fuzz_harper_core_markdown.rs
#![no_main] use harper_core::parsers::{Markdown, MarkdownOptions, StrParser}; use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &str| { let opts = MarkdownOptions::default(); let parser = Markdown::new(opts); let _res = parser.parse_str(data); });
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/fuzz/fuzz_targets/fuzz_harper_literate_haskell.rs
fuzz/fuzz_targets/fuzz_harper_literate_haskell.rs
#![no_main] // use harper_core::parsers::StrParser; use libfuzzer_sys::fuzz_target; fuzz_target!(|_data: &str| { // TODO: figure out how to create a literate haskell parser // let _res = typst.parse_str(&data); });
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/fuzz/fuzz_targets/fuzz_harper_html.rs
fuzz/fuzz_targets/fuzz_harper_html.rs
#![no_main] use harper_core::parsers::StrParser; use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &str| { let parser = harper_html::HtmlParser::default(); let _res = parser.parse_str(data); });
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/fuzz/fuzz_targets/fuzz_harper_comment.rs
fuzz/fuzz_targets/fuzz_harper_comment.rs
#![no_main] use harper_core::parsers::{MarkdownOptions, StrParser}; use libfuzzer_sys::arbitrary::{Arbitrary, Result, Unstructured}; use libfuzzer_sys::fuzz_target; #[derive(Debug)] struct Language(String); const LANGUAGES: [&str; 32] = [ "cmake", "cpp", "csharp", "c", "dart", "go", "hask...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-jjdescription/src/lib.rs
harper-jjdescription/src/lib.rs
use harper_core::Token; use harper_core::parsers::{self, Markdown, MarkdownOptions, Parser}; use harper_tree_sitter::TreeSitterMasker; use tree_sitter::Node; pub struct JJDescriptionParser { /// Used to grab the text nodes, and parse them as markdown. inner: parsers::Mask<TreeSitterMasker, Markdown>, } impl J...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-jjdescription/tests/run_tests.rs
harper-jjdescription/tests/run_tests.rs
use harper_core::linting::{LintGroup, Linter}; use harper_core::parsers::MarkdownOptions; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; use harper_jjdescription::JJDescriptionParser; /// Creates a unit test checking that the linting of a git commit document (in /// `tests_sources`) produ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/word_counter.rs
harper-pos-utils/src/word_counter.rs
use hashbrown::HashMap; #[derive(Debug, Default)] pub struct WordCounter { /// The number of times a word is associated with an error. pub word_counts: HashMap<String, usize>, } impl WordCounter { pub fn new() -> Self { Self::default() } /// Increment the count for a particular word. ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/lib.rs
harper-pos-utils/src/lib.rs
mod chunker; #[cfg(feature = "training")] mod conllu_utils; mod patch_criteria; mod tagger; mod upos; #[cfg(feature = "training")] mod word_counter; pub use chunker::{ BrillChunker, BurnChunker, BurnChunkerCpu, CachedChunker, Chunker, UPOSFreqDict, }; pub use tagger::{BrillTagger, FreqDict, FreqDictBuilder, Tagger...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/patch_criteria.rs
harper-pos-utils/src/patch_criteria.rs
use serde::{Deserialize, Serialize}; use crate::UPOS; #[derive(Debug, Clone, Serialize, Deserialize, Hash, PartialEq, Eq)] pub enum PatchCriteria { WordIsTaggedWith { /// Which token to inspect. relative: isize, is_tagged: UPOS, }, AnyWordIsTaggedWith { /// The farthest rel...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/conllu_utils.rs
harper-pos-utils/src/conllu_utils.rs
use std::{fs::File, path::Path}; use rs_conllu::{Sentence, parse_file}; /// Produce an iterator over the sentences in a `.conllu` file. /// Will panic on error, so this should not be used outside of training. pub fn iter_sentences_in_conllu(path: impl AsRef<Path>) -> impl Iterator<Item = Sentence> { let file = Fi...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/upos.rs
harper-pos-utils/src/upos.rs
use std::fmt::Display; use is_macro::Is; use serde::{Deserialize, Serialize}; use strum_macros::{AsRefStr, EnumIter}; /// Represents the universal parts of speech as outlined by [universaldependencies.org](https://universaldependencies.org/u/pos/index.html). #[derive( Debug, Default, Hash, Eq, Par...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/tagger/freq_dict_builder.rs
harper-pos-utils/src/tagger/freq_dict_builder.rs
#[cfg(feature = "training")] use std::path::Path; use hashbrown::{Equivalent, HashMap}; use strum::IntoEnumIterator; use crate::{UPOS, tagger::FreqDict}; /// A mapping between words and the frequency of each UPOS. /// If an element is missing from the map, it's count is assumed to be zero. #[derive(Debug, Default)] ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/tagger/error_counter.rs
harper-pos-utils/src/tagger/error_counter.rs
use hashbrown::HashMap; use crate::{UPOS, word_counter::WordCounter}; #[derive(Debug, Default, Clone, Hash, PartialEq, Eq)] pub struct ErrorKind { pub was_tagged: UPOS, pub correct_tag: UPOS, } #[derive(Debug, Default)] pub struct ErrorCounter { pub error_counts: HashMap<ErrorKind, usize>, /// The nu...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/tagger/mod.rs
harper-pos-utils/src/tagger/mod.rs
mod brill_tagger; #[cfg(feature = "training")] mod error_counter; mod freq_dict; mod freq_dict_builder; use crate::UPOS; pub use brill_tagger::BrillTagger; pub use freq_dict::FreqDict; pub use freq_dict_builder::FreqDictBuilder; /// An implementer of this trait is capable of assigned Part-of-Speech tags to a provide...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/tagger/freq_dict.rs
harper-pos-utils/src/tagger/freq_dict.rs
use hashbrown::HashMap; use serde::{Deserialize, Serialize}; use super::Tagger; use crate::upos::UPOS; /// A mapping between words (normalized to lowercase) and their most common UPOS tag. /// Can be used as a minimally accurate [`Tagger`]. #[derive(Debug, Default, Serialize, Deserialize, Clone)] pub struct FreqDict ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/tagger/brill_tagger/mod.rs
harper-pos-utils/src/tagger/brill_tagger/mod.rs
mod patch; #[cfg(feature = "training")] use std::path::Path; use patch::Patch; use serde::{Deserialize, Serialize}; #[cfg(feature = "training")] use super::FreqDict; #[cfg(feature = "training")] use super::error_counter::{ErrorCounter, ErrorKind}; use crate::{Tagger, UPOS}; /// A [`Tagger`] implementation based on...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/tagger/brill_tagger/patch.rs
harper-pos-utils/src/tagger/brill_tagger/patch.rs
#[cfg(feature = "training")] use crate::tagger::error_counter::ErrorCounter; use crate::{UPOS, patch_criteria::PatchCriteria}; #[cfg(feature = "training")] use hashbrown::HashSet; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Patch { pub from: UPOS, pub to: UPO...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/cached_chunker.rs
harper-pos-utils/src/chunker/cached_chunker.rs
use lru::LruCache; use std::hash::Hash; use std::num::NonZeroUsize; use std::sync::Mutex; use super::Chunker; use crate::UPOS; /// Wraps any chunker implementation to add an LRU Cache. /// Useful for incremental lints. pub struct CachedChunker<C: Chunker> { inner: C, cache: Mutex<LruCache<CacheKey, Vec<bool>>...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/upos_freq_dict.rs
harper-pos-utils/src/chunker/upos_freq_dict.rs
#[cfg(feature = "training")] use std::path::Path; use hashbrown::HashMap; use serde::{Deserialize, Serialize}; use crate::UPOS; use super::Chunker; /// Tracks the number of times any given UPOS is associated with a noun phrase. /// Used as the baseline for the chunker. #[derive(Debug, Clone, Serialize, Deserialize,...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/np_extraction.rs
harper-pos-utils/src/chunker/np_extraction.rs
//! Methods for extracting nominal phrases from datasets. use std::collections::VecDeque; use hashbrown::HashSet; use rs_conllu::{Sentence, Token, TokenID, UPOS}; pub fn locate_noun_phrases_in_sent(sent: &Sentence) -> Vec<HashSet<usize>> { let mut found_noun_phrases = Vec::new(); for (i, token) in sent.toke...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/burn_chunker.rs
harper-pos-utils/src/chunker/burn_chunker.rs
use crate::{UPOS, chunker::Chunker}; #[cfg(feature = "training")] use burn::backend::Autodiff; #[cfg(feature = "training")] use burn::nn::loss::{MseLoss, Reduction}; use burn::nn::{Dropout, DropoutConfig}; #[cfg(feature = "training")] use burn::optim::{GradientsParams, Optimizer}; use burn::record::{FullPrecisionSetti...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/mod.rs
harper-pos-utils/src/chunker/mod.rs
use crate::UPOS; mod brill_chunker; mod burn_chunker; mod cached_chunker; #[cfg(feature = "training")] mod np_extraction; mod upos_freq_dict; pub use brill_chunker::BrillChunker; pub use burn_chunker::{BurnChunker, BurnChunkerCpu}; pub use cached_chunker::CachedChunker; pub use upos_freq_dict::UPOSFreqDict; /// An i...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/brill_chunker/mod.rs
harper-pos-utils/src/chunker/brill_chunker/mod.rs
mod patch; #[cfg(feature = "training")] use std::path::Path; #[cfg(feature = "training")] use crate::word_counter::WordCounter; use crate::{ UPOS, chunker::{Chunker, upos_freq_dict::UPOSFreqDict}, }; use patch::Patch; use serde::{Deserialize, Serialize}; /// A [`Chunker`] implementation based on the work by...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-pos-utils/src/chunker/brill_chunker/patch.rs
harper-pos-utils/src/chunker/brill_chunker/patch.rs
use serde::{Deserialize, Serialize}; use crate::patch_criteria::PatchCriteria; #[cfg(feature = "training")] use crate::word_counter::WordCounter; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Patch { pub from: bool, pub criteria: PatchCriteria, } #[cfg(feature = "training")] impl Patch { pub...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-tree-sitter/src/lib.rs
harper-tree-sitter/src/lib.rs
use std::collections::HashSet; use harper_core::spell::MutableDictionary; use harper_core::{DictWordMetadata, Mask, Masker, Span}; use tree_sitter::{Language, Node, Tree, TreeCursor}; /// A Harper [`Masker`] that wraps a given tree-sitter language and a condition, /// allowing you to selectively parse only specific t...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-brill/src/lib.rs
harper-brill/src/lib.rs
use lazy_static::lazy_static; use std::num::NonZero; use std::rc::Rc; use std::sync::Arc; pub use harper_pos_utils::{ BrillChunker, BrillTagger, BurnChunkerCpu, CachedChunker, Chunker, FreqDict, Tagger, UPOS, }; const BRILL_TAGGER_SOURCE: &str = include_str!("../trained_tagger_model.json"); lazy_static! { st...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-html/src/lib.rs
harper-html/src/lib.rs
use harper_core::parsers::{self, Parser, PlainEnglish}; use harper_core::{Token, TokenKind}; use harper_tree_sitter::TreeSitterMasker; use tree_sitter::Node; pub struct HtmlParser { /// Used to grab the text nodes. inner: parsers::Mask<TreeSitterMasker, PlainEnglish>, } impl HtmlParser { fn node_condition...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-html/tests/run_tests.rs
harper-html/tests/run_tests.rs
use harper_core::linting::{LintGroup, Linter}; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; /// Creates a unit test checking that the linting of a Markdown document (in /// `tests_sources`) produces the expected number of lints. macro_rules! create_test { ($filename:ident.html, $cor...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-asciidoc/src/lib.rs
harper-asciidoc/src/lib.rs
use harper_core::parsers::{self, Parser, PlainEnglish}; use harper_core::{Token, TokenKind}; use harper_tree_sitter::TreeSitterMasker; use tree_sitter::Node; pub struct AsciidocParser { inner: parsers::Mask<TreeSitterMasker, PlainEnglish>, } impl AsciidocParser { fn node_condition(n: &Node) -> bool { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-asciidoc/tests/asciidoc_tests.rs
harper-asciidoc/tests/asciidoc_tests.rs
use harper_asciidoc::AsciidocParser; use harper_core::linting::{LintGroup, Linter}; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; /// Creates a unit test checking Asciidoc source code parsing. macro_rules! create_test { ($filename:ident.$ext:ident, $correct_expected:expr) => { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-literate-haskell/src/lib.rs
harper-literate-haskell/src/lib.rs
use harper_comments::CommentParser; use harper_core::{ Lrc, Masker, Token, parsers::{Markdown, MarkdownOptions, Mask, Parser}, }; mod masker; use harper_core::spell::MutableDictionary; use itertools::Itertools; use masker::LiterateHaskellMasker; /// Parses a Literate Haskell document by masking out the code a...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-literate-haskell/src/masker.rs
harper-literate-haskell/src/masker.rs
use harper_core::{CharStringExt, Mask, Masker, Span}; /// Masker for selecting portions of Literate Haskell documents. /// /// Based on the specifications outlined at https://wiki.haskell.org/Literate_programming. pub struct LiterateHaskellMasker { text: bool, code: bool, } impl LiterateHaskellMasker { pu...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-literate-haskell/tests/run_tests.rs
harper-literate-haskell/tests/run_tests.rs
use harper_core::linting::{LintGroup, Linter}; use harper_core::parsers::MarkdownOptions; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; use harper_literate_haskell::LiterateHaskellParser; /// Creates a unit test checking that the linting of a Markdown document (in /// `tests_sources`) pr...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-typst/src/lib.rs
harper-typst/src/lib.rs
mod offset_cursor; mod typst_translator; use offset_cursor::OffsetCursor; use typst_translator::TypstTranslator; use harper_core::{Token, parsers::Parser}; use itertools::Itertools; use typst_syntax::{ Source, SyntaxNode, ast::{AstNode, Expr, Markup}, }; /// A parser that wraps Harper's `PlainEnglish` parser...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-typst/src/offset_cursor.rs
harper-typst/src/offset_cursor.rs
use typst_syntax::Source; /// Encapsulation of the translation between byte-based spans and char-based spans. This is used to /// avoid recomputing the number of characters between the beginning of the file and the current /// byte since `typst_syntax` uses byte spans while we use char spans. #[derive(Debug, Clone, Co...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-typst/src/typst_translator.rs
harper-typst/src/typst_translator.rs
use crate::OffsetCursor; use harper_core::{ Punctuation, Token, TokenKind, parsers::{PlainEnglish, StrParser}, }; use itertools::Itertools; use typst_syntax::{ Source, ast::{ Arg, ArrayItem, AstNode, DestructuringItem, DictItem, Expr, FuncCall, Ident, LetBindingKind, Param, Pattern, Spre...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-typst/tests/tests.rs
harper-typst/tests/tests.rs
use itertools::Itertools; use ordered_float::OrderedFloat; use harper_core::{DictWordMetadata, Document, NounData, Number, Punctuation, TokenKind}; use harper_typst::Typst; #[test] fn number() { let source = "12 is larger than 11, but much less than 11!"; let document = Document::new_curated(source, &Typst);...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-typst/tests/run_tests.rs
harper-typst/tests/run_tests.rs
use harper_core::linting::{LintGroup, Linter}; use harper_core::spell::FstDictionary; use harper_core::{Dialect, Document}; use harper_typst::Typst; /// Creates a unit test checking that the linting of a document in /// `tests_sources` produces the expected number of lints. macro_rules! create_test { ($filename:id...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/lib.rs
harper-comments/src/lib.rs
#![doc = include_str!("../README.md")] mod comment_parser; mod comment_parsers; mod masker; pub use comment_parser::CommentParser;
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/masker.rs
harper-comments/src/masker.rs
use harper_core::Masker; use harper_core::spell::MutableDictionary; use harper_tree_sitter::TreeSitterMasker; pub struct CommentMasker { inner: TreeSitterMasker, ignore_condition: Box<dyn Fn(&String) -> bool + Send + Sync>, } impl CommentMasker { pub fn create_ident_dict(&self, source: &[char]) -> Option<...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/comment_parser.rs
harper-comments/src/comment_parser.rs
use std::path::Path; use crate::comment_parsers; use comment_parsers::{Go, JavaDoc, JsDoc, Lua, Solidity, Unit}; use harper_core::Token; use harper_core::parsers::{self, MarkdownOptions, Parser}; use harper_core::spell::MutableDictionary; use tree_sitter::Node; use crate::masker::CommentMasker; pub struct CommentPar...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/comment_parsers/jsdoc.rs
harper-comments/src/comment_parsers/jsdoc.rs
use harper_core::Lrc; use harper_core::parsers::{Markdown, MarkdownOptions, Parser}; use harper_core::{Punctuation, Span, Token, TokenKind}; use itertools::Itertools; use super::without_initiators; #[derive(Clone)] pub struct JsDoc { inner: Lrc<dyn Parser>, } impl JsDoc { pub fn new(parser: Lrc<dyn Parser>) ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/comment_parsers/unit.rs
harper-comments/src/comment_parsers/unit.rs
use harper_core::Lrc; use harper_core::parsers::{Markdown, MarkdownOptions, Parser}; use harper_core::{Span, Token}; use super::without_initiators; /// A comment parser that strips starting `/` and `*` characters. /// /// It is meant to cover _most_ cases in _most_ programming languages. /// /// It assumes it is bein...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/comment_parsers/go.rs
harper-comments/src/comment_parsers/go.rs
use harper_core::Lrc; use harper_core::Token; use harper_core::parsers::{Markdown, MarkdownOptions, Parser}; use super::without_initiators; #[derive(Clone)] pub struct Go { inner: Lrc<dyn Parser>, } impl Go { pub fn new(parser: Lrc<dyn Parser>) -> Self { Self { inner: parser } } pub fn new_m...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-comments/src/comment_parsers/solidity.rs
harper-comments/src/comment_parsers/solidity.rs
use harper_core::Lrc; use harper_core::Span; use harper_core::Token; use harper_core::parsers::{MarkdownOptions, Parser}; use super::jsdoc::JsDoc; use super::without_initiators; #[derive(Clone)] pub struct Solidity { inner: Lrc<dyn Parser>, } impl Solidity { pub fn new(parser: Lrc<dyn Parser>) -> Self { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false