Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> allocate a buffer at startup and let the system clean it up when the program exits

This is possible with the lazy_static library or (not yet in stable Rust) OnceCell. It allows you to allocate & initialize any datastructure once during runtime and get global read-only access.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: