precompile 0.1.0

Monomorphization precompilation library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::ops::Div;

#[precompile::precompile]
#[precompile_with[std::time::Duration, u32]]
#[cfg_attr(debug_assertions, precompile_with[usize, usize])]
extern "Rust" fn foo<A: Div<B, Output = A>, B>((a, b): (A, B)) -> A {
    a / b
}

#[precompile::precompile]
#[precompile_with(u32)]
pub fn generic_fn<T>() {
    // ...
}