-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: Better Support for Embedded #1450
Comments
re: (1.) the less we bundle with the compiler the easier it is to use it as a Carp in constrained environments. right now, we kind of force users to adopt our array and box types -- if we roll them entirely into the core lib instead, we'd be able to allow users to exclude them w/ re: (2.) code size matters in embedded. chances are C compilers would strip away unused C code anyway, we might as well help with that if we can by not generating unused C to begin with. re: (3.) volatile and other qualifiers/attributes are important in embedded to ensure compilers don't e.g. eliminate unused bindings in register structs and such. And another I thought of:
|
Also really curious to hear if @TimDeve has thoughts on this |
Hey Scott, I think these three improvement would be useful for sure.
On the library point I think the current implicit thing with main is kinda confusing, and explicit flag could be better. I also don't even remember what we generate then? An object file or a dynlib? |
I also think all of these suggestions are great! Perhaps the slightly extreme solution of not loading any core libraries by default could help? (I think Purescript does this..?) So it's all up to the user to decide what they bring in, except for stuff that is absolutely necessary for the compiler to start. One question then is what to do with the Regarding code generation (and executable/library generation) I think a neat UX could be to provide something like Regarding point 3 – we do support this for definitions, right? (using meta data) But I guess it has to go in more places to be truly useful? Perhaps a separate issue with more details could clarify this. |
Yes, we do! If I remember correctly though the UX around it wasn't perfect. I recall having to use |
I'd like to use carp to generate some embedded code. This issue just tracks some quality of life improvements that I think would make that easier:
Will add further rationale in a bit.
The text was updated successfully, but these errors were encountered: