Comments (4)
Added by #3. 👏 @stuffmatic
Will create a 0.4 release when #4 is merged.
from midi-msg.
Good idea! Happy to have the contribution :)
from midi-msg.
I just got the crate to compile with no_std
support, but it turned out to be a bit more work than I anticipated. Here are my findings so far:
- The
ascii
crate providesAsciiString
inno_std
environments if thealloc
feature is enabled. However, this feature seems to have been added after the 1.0 release, which means theascii
crate must be fetched from the git repo. - There are some math functions that are only available in
std
. I used themicromath
crate, which providesno_std
compatible drop in replacements forf32
math functions. Some of these, likepowf
andlog2
, are only approximations though, so it would be necessary to verify that the accuracy is good enough.
The above issues seem to (only?) pertain to "exotic" features like sysex, so it might be an option to add cargo feature flags for disabling certain features for no_std
builds. This would also provide a way of reducing the binary size, which is useful in resource constrained environments.
I still think it would be really nice if this crate had no_std
support, even if it means (at least initially) sacrificing/disabling some features, and I'm happy to work on this if we can find a way forward. It would be interesting to hear your thoughts about this.
from midi-msg.
Nice findings!
Regarding ascii
: I'm not particularly against using a git revision. Perhaps the author of that crate could be convinced to cut a new version, though.
Regarding micromath
: I'm not at all opposed. The precision of the math operations performed for this crate is inherently limited by the low bit depth of the numbers they're operating on, so I don't foresee any problems.
So that said, it sounds like we can get to no_std
without hiding functionality behind features. I can see the utility in having a reduced binary size too, but I think we can agree that this would best be an additional feature rather than a way of attaining no_std
. Certainly the majority of this crate lives under SystemExclusiveMsg
so that would be a natural cut-point for sure. So yeah, I'd also be open to a no_sysex
feature.
from midi-msg.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midi-msg.