more docs and added the import_config.h file to controlle which c++ libraries are added

This commit is contained in:
ZennDev1337 2023-08-16 09:58:14 +02:00
parent c4f43a0f9d
commit fd48cc36c5
7 changed files with 73 additions and 21 deletions

File diff suppressed because one or more lines are too long

View file

@ -25,6 +25,15 @@
<a href="#25" id="25">25</a>
<a href="#26" id="26">26</a>
<a href="#27" id="27">27</a>
<a href="#28" id="28">28</a>
<a href="#29" id="29">29</a>
<a href="#30" id="30">30</a>
<a href="#31" id="31">31</a>
<a href="#32" id="32">32</a>
<a href="#33" id="33">33</a>
<a href="#34" id="34">34</a>
<a href="#35" id="35">35</a>
<a href="#36" id="36">36</a>
</pre></div><pre class="rust"><code><span class="attr">#![cfg(target_arch = <span class="string">&quot;avr&quot;</span>)]
#![no_std]
#![feature(c_size_t)]
@ -35,11 +44,20 @@
//! ```
//! use arduboy_rust::prelude::*;
//! ```
//! Inside the Wrapper-Project folder is a folder named src.
//! You can disable C++ libraries in the main.h file.
//! ### Disable C++ libraries
//! Inside the root directory is a file named `import_config.h`
//!
//! You can disable C++ libraries in the `import_config.h` file.
//! Just comment the unused library definition out.
//!
//! To get an idea, the ArduboyTones Library needs 2-3% of the flash memory.
//! Be careful with disabling libraries because:
//! - The only error you get is something like this if you try to use a function that relies on the library you disabled.
//! ```text
//! game.90c69b91e57f285-cgu.0:(.text.loop+0x290): undefined reference to `sound_tone&#39;
//! ```
//! - the benefit of disabling will be important in the feature when I add support for the ArduboyG library etc.
//!
//! To get an idea, the ArduboyTones Library needs additional 2-3% of the flash memory.
//!
//! [Here is the link to the GitHub Repo](https://github.com/zenndev1337/rust-for-arduboy)