Skip to content

Instantly share code, notes, and snippets.

View kehrazy's full-sized avatar

Igor kehrazy kehrazy

View GitHub Profile
@kehrazy
kehrazy / main.rs
Last active June 9, 2025 21:40
bad, bad, not good IR. practically unusable (doesn't have a pass manager, good RAII wrappers, doesn't use typestate, doesn't have basic walkers, is riddled with Rc<RefCell<...>>, depends on std and macros). for all tha rust fanboys - i'm sorry.
#![feature(formatting_options)]
use downcast_rs::{Downcast, impl_downcast};
use generational_arena::{Arena, Index};
use std::cell::{RefCell, RefMut};
use std::collections::HashMap;
use std::fmt::{self, Debug, Display};
use std::rc::Rc;
mod ir {
@kehrazy
kehrazy / Cargo.toml
Created July 18, 2024 17:39
[workspace.lints] table for Cargo.toml
[workspace.lints.rust]
unsafe_code = "deny"
elided_lifetimes_in_paths = "warn"
future_incompatible = "warn"
nonstandard_style = "warn"
rust_2018_idioms = "warn"
rust_2021_prelude_collisions = "warn"
semicolon_in_expressions_from_macros = "warn"
trivial_numeric_casts = "warn"
unsafe_op_in_unsafe_fn = "warn"
1.2.3
---
Checks: >
bugprone-*,
google-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,