Skip to content

Instantly share code, notes, and snippets.

@fschutt
fschutt / kickstart.md
Created August 25, 2026 08:57
Kickstart: implementing rich clipboard transport in azul — the seam, the rich-clipboard API, and the per-platform behaviour that is not in any spec

Kickstart: rich clipboard support in azul

You are implementing OS clipboard/drag-and-drop transport in azul (~/Development/azul). The parsing half already exists, is tested, and is published — you are writing the layer that talks to the operating system.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dynamisches ERP Formular</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="app"></div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fschutt
fschutt / How to fix the WebRender MaxTextureSize error (error code 1282)
Created July 19, 2019 13:56
How to fix the WebRender MaxTextureSize error (error code 1282)
If you are using WebRender and you get a MaxTextureSize error,
the problem is that the OpenGL context is broken. When calling
Renderer::new(), the context you are binding to *must be current*.
Otherwise, Renderer::new() will crash with a assert!(0, 1282) in
debug and a MaxTextureSize error in release mode.
@fschutt
fschutt / Rust.sublime-color-scheme
Created June 15, 2018 16:17
Rust Sublime Color Scheme
{
"name": "Rust color scheme",
"rules": [
/* --- grey items --- */
{
"scope": "comment",
"foreground": "color(var(black) blend(#fff 50%))",
},
/* --- red items --- */
{
extern crate itoa;
extern crate smallvec;
macro_rules! print_time {
($start:expr, $end:expr) => (println!("time: {} ns", ($end - $start).subsec_nanos() as f32 / 1_000_000.0);)
}
// 189 ns
fn new_order_slow(stock: &str, price: i32, quantity: i32) -> String {
format!("NEW {} {} {}", stock, price, quantity)
pub enum MyMarker { };
let a = MyMarker{ }; // no!
let b = MyMarker; // no!
let c = MyMarker:: ; // ???
mod private_module {
pub struct PublicStruct;
}
pub fn public_function() -> PublicStruct { /* ... */ }
#[cfg(not(use_double_precision))]
pub type fsize = f32;
#[cfg(use_double_precision)]
pub type fsize = f64;
let x: fsize = 50.0;