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

``` #![cfg_attr(not(test), no_std)] ```

Test code doesn't need to live on the device itself. You can call no_std code from std code and tell the compiler "hey, this code is only ran on hosts that have access to std" without trying to bundle the std library into your no_core code. You're not going to able to test I/O (does this function actually set Pin0 to HIGH or LOW) but you can test logic.



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

Search: