nviennot / turbo-resin

Open-source firmware for resin printers
GNU General Public License v3.0
205 stars 21 forks source link

`rust-toolchain.toml` has no effect on build (?) #8

Open fralalonde opened 2 years ago

fralalonde commented 2 years ago

It seems that rust-toolchain.toml has no effect on build: make build fails if the default toolchain is set to stable. But if renamed to rust-toolchain (without extension) then it works as expected: the specified nightly version gets downloaded and is used for the build.

I don't know why that is since the doc says both file names should work.

(env: Arch Linux, manually installed rustup)

nviennot commented 2 years ago

This is strange, do you have a recommendation at this point? Should we make a symlink rust-toolchain to rust-toolchain.toml ?

fralalonde commented 2 years ago

I don't personally need this fixed now as I was only test-building the project, which succeeded once I renamed the file. So unless it is also confirmed by someone else things can stay as they are for now? Or you could preemptively change the filename based on my sole report, it's up to you.

Context: My intention is to use the USB host code to advance the embedded USB host stack project. Your impl was suggested by @dirbaio on Rust + USB matrix channel. Licenses are compatible (GPL3) and if it works, I'll of course add the appropriate credits and links.

Dirbaio commented 2 years ago

@fralalonde try updating rustup (not rust), I think older rustups didn't take the .toml file.

Dirbaio commented 2 years ago

also, would you guys consider licensing the usb host code as Apache+MIT instead? I'm interested to add in host functionality for embassy-usb eventually, but can't take GPL/LGPL so I'll have to reinvent the wheel if not :(

fralalonde commented 2 years ago

I just reinstalled rustup:

❯ rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)

Seems to be the latest, but it's 1+ year old?

nviennot commented 2 years ago

I can change the turboresin's USB host code to Apache+MIT, absolutely. Will do tomorrow.

nviennot commented 2 years ago

The license is updated for the USB host stack to Apache2.0+MIT

nviennot commented 2 years ago

Also, please note that my implementation feels a little brittle on USB port activation (see this line). After that, the core may or may not need a port reset (see here) depending if we are running a stm32f1 or stm32f4. It's strange. Aside from that, things are working smoothly.