I’m wanting to write a library that will work both on embedded devices with out any filesystem, but then also work on devices with an operating system.
// With "no_std": An embedded device, where `vec_data` is some valid vector data. let x3 = new X3(); let x3_encoded = x3.encode(vec_data); // With "std": above code should work fine, but also the following: let x3_encoded_from_file = X3.fromFile("/path/to/my/file.dat");
How would I structure the crate such that the module will include
"std" components when the target is an operating system, and
"no_std" when the target is an embedded device?