Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 308 Bytes

readme.md

File metadata and controls

30 lines (20 loc) · 308 Bytes

CFFI magic

Quick iteration of cffi in notebooks.

%%cffi int quint(int);
int quint(int n)
{
    return 5*n;
}

# quint(9) # 45

rust magic

If you have rust installed:

%%rust int double(int);

#[no_mangle]
pub extern fn double(x: i32) -> i32 {
    x*2
}

# double(6) # 12