"And it doesn't work for `const..." <- > <@haobogu:matrix.org> And it doesn't work for `const fn`? The following code doesn't work: > ```rust > // In library: > #[linkage = "weak"] > #[no_mangle] > const fn get_size() -> usize { > 32 > } > pub(crate) const EVENT_CHANNEL_SIZE: usize = get_size(); > > // In User Space > #[no_mangle] > const fn get_size() -> usize { > 16 > } > ``` const fns are evaluated at compile time by the compiler, so linker attributes probably just don't have any effect at all. Maybe you can check that with https://godbolt.org/ ?