____ __ _ __ ___ ___ ____
/ __ \__ _______/ /_(_)___ / |/ /____/ | / __/__ ___
/ / / / / / / ___/ __/ / __ \ / /|_/ / ___/ /| |/ /_/ _ \/ _ \
/ /_/ / /_/ (__ ) /_/ / / / / / / / / /__/ ___ / __/ __/ __/
/_____/\__,_/____/\__/_/_/ /_/ /_/ /_/\___/_/ |_/_/ \___/\___/
Systems Developer | Rust | Android | Kernel Hacker
name: Dustin McAfee
role: Systems Developer
location: UTC -05:00
current_focus:
- RustVNC: Memory-safe VNC implementation in Rust
- ESM-Android: Push-based event delivery for Android
- Android Kernel & Framework Development
notable_contributions:
- FDA/ecglib: ECG analysis running on HIVE supercomputer
- Arctic Code Vault: Code preserved for 1000 years
- crates.io: Published Rust crates|
Pure Rust VNC server library with RFC 6143 compliance, async/await via Tokio, and 11 encoding types |
Event Stream Model - push-based input delivery for Android reducing latency & syscall overhead |
|
Commander open-source platform for Windows, Mac, Linux, and Android |
Android VNC server app with screen sharing, reverse VNC & built-in web client |
Rust: VNC Server Library (click to expand)
//! # rustvncserver
//!
//! A pure Rust implementation of a VNC (Virtual Network Computing) server.
//!
//! This library provides a complete VNC server implementation following the RFB
//! (Remote Framebuffer) protocol specification (RFC 6143). It supports all major
//! VNC encodings and pixel formats, with 100% wire-format compatibility with
//! standard VNC protocol.
//!
//! ## Features
//!
//! - **11 encoding types**: Raw, `CopyRect`, RRE, `CoRRE`, Hextile, Zlib, `ZlibHex`,
//! Tight, `TightPng`, ZRLE, ZYWRLE
//! - **All pixel formats**: 8/16/24/32-bit color depths
//! - **Tight encoding**: All 5 production modes (solid fill, mono rect, indexed
//! palette, full-color zlib, JPEG)
//! - **Async I/O**: Built on Tokio for efficient concurrent client handling
//! - **Memory safe**: Pure Rust with zero unsafe code in core logic
//! - **Optional `TurboJPEG`**: Hardware-accelerated JPEG compression via feature flag
//!
//! ## Quick Start
//!
//! ```no_run
//! use rustvncserver::VncServer;
//! use rustvncserver::server::ServerEvent;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a VNC server with 1920x1080 framebuffer
//! let (server, mut event_rx) = VncServer::new(
//! 1920,
//! 1080,
//! "My Desktop".to_string(),
//! Some("secret".to_string()), // Optional password
//! );
//!
//! // Handle events from clients in a background task
//! tokio::spawn(async move {
//! while let Some(event) = event_rx.recv().await {
//! match event {
// Public API
pub mod error;
pub mod events;
pub mod framebuffer;
// ... (see full source)C: ESM Kernel Module (click to expand)
/*
* ESM (Event Stream Model) - Push-based event delivery for Android
*
* Replaces polling-based event handling with direct event push to applications.
* This reduces latency and power consumption by eliminating polling loops.
*
* Copyright (C) 2025
*
* Based on research by Stephen Marz and Brad Vander Zanden, University of Tennessee
*/
#include <linux/kernel.h>
#include <linux/syscalls.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
#include <linux/kfifo.h>
#include <linux/input.h>
#include <linux/uaccess.h>
#include <linux/hashtable.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <uapi/linux/esm.h>
/* ESM constants */
#define ESM_EVENT_QUEUE_SIZE 256 /* Events per registered device */
#define ESM_MAX_DEVICES 32 /* Max input devices per process */
#define ESM_HASH_BITS 6 /* Hash table size for device lookup */
/*
* Global list of all ESM contexts (for esm_push_event reverse lookup)
* Protected by esm_global_lock
*
* TODO: Optimize by adding ESM context pointer directly to task_struct
*/
static LIST_HEAD(esm_context_list);
static DEFINE_SPINLOCK(esm_global_lock);
/*
* ESM device registration structure
*
* Each registered input device gets one of these.
* Uses kfifo for event queue (fixes Android 7 linked-list jitter issue).
// ... (see full source)C++: ECG T-Wave Analysis (click to expand)
/**
* @file delineators/twave/ecglib/delineator/twave/twaveDelineator.cpp
* @author Meisam Hosseini <meisam.hosseini@fda.hhs.gov>
* @author Jose Vicente <jose.vicenteruiz@fda.hhs.gov>
* @author Lars Johannesen <lars.johannesen@fda.hhs.gov>
* @author Dustin C McAfee <dustin.mcafee@fda.hhs.gov
*
* @version 1.0.0
*
* @section LICENSE
* ecglib is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License (GNU LGPL3), or (at your option) any later version.
* ecglib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.
*
* @section DISCLAIMER
* ecglib software and documentation were developed by the authors in their capacities as Oak Ridge Institute for Science and Education (ORISE) research fellows at the U.S. Food and Drug Administration (FDA). .
* FDA assumes no responsibility whatsoever for use by other parties of the Software, its source code, documentation or compiled executables, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. Further, FDA makes no representations that the use of the Software will not infringe any patent or proprietary rights of third parties. The use of this code in no way implies endorsement by the FDA or confers any advantage in regulatory decisions.
*
* @section DESCRIPTION
* General input/output data to/form twaveDelineator
*/
#include <functional> // make_tuple
#include "delineate.hpp"
#ifdef ECGLIB_PREPROCESSORS
#include <ecglib/preprocessors/filters.hpp>
#endif
#include <ecglib/delineator/twave/twaveDelineator.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/any.hpp>
namespace ecglib {
// prepartion of thresholds of classification rules based on decision tree
// Input is an '_' separated string of thresholds and output is vector of thresholds
std::vector<std::vector<double> > featursThresholdPreparation(std::string thresholds); // function prototype
// main entrance into twaveDelineator for calculating twave annotations
std::tuple<pointmap, ecglib::twaveDelineate::annotation> twaveDelineators(const ecglib::ecgdata &e, const ecglib::pointmap &pmin, const ecglib::twaveDelineator_config &cfg) {
if(e.fs() != 1000){ // check the valid frequency
std::string line = std::string("frequency should be 1000Hz");
std::cerr << line;
throw std::logic_error(line);
}
ecglib::ecgdata ecg(e); // internal ecg variable
ecglib::pointmap pm(pmin); // internal annotation variable
int vcgIndex (0); // index of VCG inside ecgdata
arma::vec filt = zeros<vec>(1); // filter instantiation
vcgIndex = ecg.leadnum(ecglead::VCGMAG); // index of VCG
// ... (see full source)- RustVNC - Building production-ready, memory-safe VNC libraries in Rust with full RFC 6143 compliance
- ESM-Android - Developing a push-based event delivery system for Android to reduce latency & syscall overhead
- dongadeuce - Commander open-source platform in Kotlin
- Android Kernel Development - Custom kernel modifications and framework-level enhancements


