Skip to content

Instantly share code, notes, and snippets.

@pohzipohzi
pohzipohzi / clangd.md
Last active March 26, 2025 17:03
setting up clangd

Here are some examples of how to setup clangd for a project

If the project:

  • uses meson

meson setup <build_dir> generates a compilation database in <build_dir>/compile_commands.json. Since clangd automatically looks for the compilation database in build, we don't need to do anything else if build is the name of the build directory

meson setup build
@pohzipohzi
pohzipohzi / main.rs
Created August 23, 2024 14:10
minimal fft implementation
use std::{
f64::consts::PI,
fs::File,
io::Read,
iter::zip,
time::{Duration, Instant},
};
fn main() {
let mut t = [Duration::ZERO; 4];