esp-rs / embuild

Build support for embedded Rust: Cargo integration with other embedded build ecosystems & tools, like PlatformIO, CMake and kconfig.
Apache License 2.0
135 stars 38 forks source link

Change destination of the .embuild directory? #79

Closed Hecatron closed 1 year ago

Hecatron commented 1 year ago

I've been looking at using the esp32 template for rust recently https://github.com/esp-rs/esp-idf-template

I know there's an issue with path length's under Windows. In that files under the generated .embuild directory tend to be quite deep. Which means you need to shorten the path the project is located under.

One question I've got is it possible to override the destination directory of .embuild via a configuration option or environmental variable some how? I've been looking through the code but haven't found out how the path is calculated yet I feel this would be pretty useful if it hasn't been implemented already.

ivmarkov commented 1 year ago

https://github.com/esp-rs/esp-idf-sys/blob/master/BUILD_OPTIONS.md#esp_idf_tools_install_dir-esp_idf_tools_install_dir

Hecatron commented 1 year ago

Thanks that's exactly what I was looking for

# .cargo/config.toml
[env]
ESP_IDF_TOOLS_INSTALL_DIR = '''custom:C:\Temp\embuild'''