3 ms·
This is my take as well. I build and sell electronics, coded in Rust. (Cortex-M). I started using OSS HALs, device drivers, utility crates, peripheral access li
by the__alchemist 5y ago
This is my take as well. I build and sell electronics, coded in Rust. (Cortex-M). I started using OSS HALs, device drivers, utility crates, peripheral access libs etc. Each of them had bugs, missing features, or awkward APIs. I got about 10% of my issues and PRs addressed. I now use almost exclusively internal code (with exceptions for debug tools and the cortex-m lib). If there's a problem or limitation, I fix it myself. Far easier than spelunking someone else's code, or hoping a maintainer fixes it.
- pabs3 5y agoDo you make the internal code OSS?
- the__alchemist 5y agoSome of it - my custom HAL is OSS, and I've published the full repo code to one of my firmwares.
- pabs3 5y agoAnd do you get any PRs/issues? Are they all solved?
- the__alchemist 5y agoI've had a few. All solved except one. I suspect only a few people are using my lib, and all are hobbyists. A particular challenge with this lib is I'm attempting to support most (newer) STM32 variants using a single HAL lib, which makes ops testing tough. (This allows me the flexibility to choose whichever variant I'd like on future projects without modifying the code base). I've published code so others can use it as an example. Reading between the lines of your questions: I'm not throwing spears at the lib maintainers; I'm pointing out that relying on 3rd party code may cause complications. In my case, I made a decision on each individual lib.
- pabs3 5y agoThere is a bit of a programmer trope "its easier to write code than to read it". This leads to reinventing wheels, duplicated effort, etc. When it comes to open source, I take the position that we are all in it together and try to come up with fixes for problems that I see in existing projects, even if I've never used the language before or the codebase is messy. I also think being able to work on code that came before you is a useful skill to have.