[Feature Request] `--free-standing` option in command line to make embedded systems
Nobody has claimed this yet.
- Dominant language
- Mojo
- Stars
- 29.8k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Review Mojo's priorities
- I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
An option in the compiler that make the binary not dependending of external operating system to work (--freestanding, or another name) which is present in C compilers (clang -ffreestanding -c my_program.c). In the context of C compilers, "freestanding" refers to a program that is compiled to run in a bare-metal environment or an embedded system, where there might not be full support for all standard libraries and functionalities expected in a "hosted" environment, like a complete operating system. In a freestanding environment, the only mandatory functionalities from the standard library are those defined in section 4 of the C standard specification, which include the minimum functionalities necessary for compiling programs. For example, functions like printf, malloc, or exit are not guaranteed to be available.
What is your motivation for this change?
Create a tiny operating system in Mojo as described here.
But developers that write other embbeded systems also will need if want code them in mojo.
Any other details?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The request concerns the Mojo compiler and a freestanding --freestanding-style option; start by locating compiler command-line option handling and review discussion #3334. Done means the compiler supports producing binaries without an external operating-system dependency for the intended embedded use case.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100