How to Contribute
Luma is an open and growing language - we warmly welcome contributions from the community. Whether you’re fixing bugs, extending the standard library, or proposing new core functionality, your contributions help shape the language’s future.
Contribution Areas
You can contribute to Luma in several meaningful ways
1. Improve Existing Core Functions
Luma’s standard functions (such as print(), to_int(), etc.) are defined internally using Go. You can suggest improvements such as:
- Bug fixes or edge-case handling.
- Performance enhancements.
- Better formatting or output logic.
- Cleaner or safer type handling.
Changes to existing core functions will be reviewed carefully for stability and compatibility.
2. Suggest New Core Functions
You’re welcome to propose new built-in functions for Luma. For example:
print() → _luma_print()To do this, include:
- A function name and its purpose.
- A suggested Go implementation (optional, but appreciated).
- A properly formatted function header comment (see below).
- A short explanation of why it should be part of core.
Once accepted, your name will be preserved in the header comment as the original author.
Function Header Guidelines
All core Luma functions must include a standardized header to ensure clarity and attribution. Here’s the expected format:
// Name: _luma_functionName
// Description: A short sentence describing what this function does.
// Author: Your Name (or GitHub handle)
// Version: 1.0
// Parameters:
// - name (type): brief description
// - ...
// Returns: type — what the function returns
// Notes:
// - (Optional) any extra details about behavior, edge cases, or design decisions.Example:
// Name: _luma_toInt
// Description: Converts a string to an integer (returns nil if invalid).
// Author: Luma Core
// Version: 1.0
// Parameters:
// - s (string): The input string to convert.
// Returns: *int (pointer to int; nil if conversion fails)Use this format for all function contributions. This makes your work clean, discoverable, and maintainable.
Development Practices
- Follow existing naming conventions (
_luma_*for core functions). - Keep logic clean, minimal, and well-documented.
- Prefer safety: nil handling, type checks, and input validation are important.
- Ensure code compiles and passes any existing test scripts (if available).
- If unsure, ask! Contributions can be discussed in issue threads or community channels.
Testing Your Contribution
To verify your function works:
- Create a small
.lumafile using your function. - Use the CLI:
luma run test.luma- For debug purposes:
luma compile test.lumaIf your function affects the parser or compiler behavior, write corresponding Luma code examples and check compilation.
Licensing and Credit
Luma is open-source, and all accepted contributions are published under its license. However:
- Your authorship is retained in the function header.
- You can be credited in changelogs, documentation, or GitHub contributor lists.
Submitting Your Contribution
- Fork the Luma repo.
- Create a feature branch (e.g.
feature/to_hex_function) - Commit your changes with a meaningful message.
- Open a Pull Request describing your contribution.
Need Help?
If you’re unsure how to start or have questions about contributing, feel free to reach out through:
- GitHub Issues
- Discussions
- Community chat (to be announced)
We look forward to building Luma with you!