๐Ÿค Contributing Guide - FluxSharp

Guidelines for contributing to FluxSharp. We welcome all contributions!


Table of Contents

  1. Getting Started
  2. Types of Contributions
  3. Development Setup
  4. Submitting Changes
  5. Code Guidelines
  6. Documentation Guidelines
  7. Community

Getting Started

Prerequisites

  • Git

  • Rust toolchain (1.56+)

  • C/C++ compiler

  • Basic knowledge of FluxSharp

Fork and Clone

  1. Fork the repository on GitHub

  2. Clone your fork:

    git clone https://github.com/YOUR_USERNAME/flux-sharp.git

  3. Add upstream:

    git remote add upstream https://github.com/Yvan4001/FluxSharp.git

  4. Create a branch:

    git checkout -b feature/my-feature

Set Up Development Environment

cd flux-sharp cd fluxcompiler cargo build cd ..


Types of Contributions

๐Ÿ› Bug Fixes

Found a bug? Help us fix it! Steps:

  1. Create an issue describing the bug

  2. Fork and create a feature branch

  3. Write a test that reproduces the bug

  4. Fix the bug

  5. Ensure tests pass

  6. Submit a pull request

Example:

Issue: Array out of bounds returns wrong error message Fix: Update error message in bounds checking code Test: testoutofboundserrormessage()

โœจ Features

Want to add a new feature? Steps:

  1. Discuss in an issue first (for major features)

  2. Implement the feature with tests

  3. Document the feature

  4. Submit a pull request

  5. Respond to feedback

๐Ÿ“š Documentation

Help improve documentation! Types:

  • Fix typos and grammar

  • Add examples

  • Clarify explanations

  • Add tutorials

  • Update guides

How:

  1. Edit

    .md

    files in the

    docs/

    folder

  2. Add/improve examples

  3. Verify all links work

  4. Submit a pull request

๐Ÿงช Tests

Improve test coverage! Areas:

  • Edge cases

  • Error conditions

  • Performance scenarios

  • Integration tests

Example:

void testArrayBoundsMultipleAccess() { int[] arr = new int[5]; // Test multiple accesses // Test boundary conditions // Test error handling }

๐Ÿ’ก Ideas & Discussion

Have ideas? Share them!

  • Open an issue to discuss

  • Share use cases

  • Suggest improvements

  • Provide feedback


Development Setup

Build the Compiler

cd fluxcompiler cargo build --release cd ..

Create Test Files

# Create a test program echo 'class Main { public void main() { print("Hello from test!"); } }' > test.fsh

Run it

./build.sh test.fsh

Run Tests

# Run all tests cargo test --all

Run specific test

cargo test testname

Run with output

cargo test -- --nocapture

Create Examples

Place examples in

examples/

:

examples/ โ”œโ”€โ”€ 01helloworld.fsh โ”œโ”€โ”€ 02variables.fsh โ”œโ”€โ”€ 03functions.fsh โ””โ”€โ”€ 04_classes.fsh


Submitting Changes

Commit Messages

Write clear, descriptive commit messages:

# โœ“ Good commit: Add bounds checking for arrays

  • Implement runtime bounds verification

  • Add error messages

  • Update documentation

โœ“ Good

commit: Fix compilation error in class methods

โœ— Bad

commit: fix stuff commit: update

Pull Request Process

  1. Update your branch:

``

bash git fetch upstream git rebase upstream/main

`

  1. Commit your changes:

`

bash git add . git commit -m "Clear description of changes"

`

  1. Push to your fork:

`

bash git push origin feature/my-feature

`

  1. Create Pull Request:
  • Go to GitHub

  • Click "New Pull Request"

  • Fill in the template

  • Link any related issues

  1. PR Template:

`

markdown ## Description What does this PR do? ## Related Issues Closes #123 ## Changes

  • Change 1

  • Change 2

  • Change 3

## Testing How was this tested? ## Checklist

  • [ ] Code follows style guidelines

  • [ ] Tests added/updated

  • [ ] Documentation updated

  • [ ] No breaking changes

`

  1. Respond to Feedback:
  • Address review comments

  • Push new commits

  • Don't force-push (keep history)


Code Guidelines

Style

  • Follow existing code style

  • Use 4-space indentation

  • Keep lines under 100 characters

  • Use descriptive names

Naming Conventions

// Classes - PascalCase class UserManager { } // Methods - camelCase public void calculateTotal() { } // Variables - camelCase int userCount = 0; // Constants - UPPERSNAKECASE int MAX_ATTEMPTS = 3;

Comments

// โœ“ Good - Explains why // Perform bounds checking before array access // This prevents buffer overflow attacks if (index >= array.length()) { throw new Exception("Index out of bounds"); } // โœ— Bad - States obvious // Check index if (index >= array.length()) { throw new Exception("Index out of bounds"); }

Error Handling

// โœ“ Good try { processData(data); } catch (IOException e) { print("Failed to process data: " + e); throw new Exception("Processing failed"); } // โœ— Bad try { processData(data); } catch (Exception e) { // ignore }

Testing

// Write tests for all changes void testNewFeature() { // Arrange int input = 5; // Act int result = calculate(input); // Assert assert(result == 10); }


Documentation Guidelines

Markdown Files

  • Use clear headings (H1, H2, H3)

  • Include examples

  • Link to related docs

  • Keep explanations simple

Example Documentation

## Topic Title Brief introduction.

Subsection

Explanation of concept.

Example

\

\

\

rust // code example \

\

\`

Related

Code Examples

  • Must be correct and runnable

  • Include comments for clarity

  • Show common use cases

  • Highlight best practices

Documentation Template

For new features:

  1. Overview - What it does

  2. Syntax - How to use it

  3. Examples - Working code

  4. Best Practices - Do's and don'ts

  5. Related Links - See also sections


Community

Communication Channels

  • GitHub Issues - Bug reports, feature requests

  • GitHub Discussions - General discussion

  • GitHub Pull Requests - Code review

  • Documentation - Best practices and guides

Code of Conduct

Be respectful and inclusive:

  • โœ“ Do be friendly and professional

  • โœ“ Do respect different perspectives

  • โœ“ Do provide constructive feedback

  • โœ— Don't be offensive or dismissive

  • โœ— Don't spam or flood

  • โœ— Don't post private information

Recognition

Contributors are recognized in:

  • CONTRIBUTORS file

  • Release notes

  • GitHub contributors page


Getting Help

Questions

  • Check existing documentation

  • Search GitHub issues

  • Ask in discussions

  • Comment on related issues

Stuck on Something?

  1. Read the error message carefully

  2. Check documentation relevant to the error

  3. Search existing issues

  4. Ask for help with context and details

Need Review?

For significant changes:

  • Create a draft PR first

  • Ask for early feedback

  • Be open to suggestions

  • Iterate together


Recognition & Thanks

First Time Contributing?

Thank you! We appreciate:

  • Bug reports

  • Documentation improvements

  • Code fixes

  • Testing and feedback

Regular Contributors

We value your ongoing:

  • Code reviews

  • Mentoring new contributors

  • Documentation maintenance

  • Community support

Maintainers

Special thanks to:

  • Project founders

  • Core maintainers

  • Active contributors

  • Community members


Common Questions

Q: Can I contribute without coding?

A: Absolutely! We need:

  • Documentation writers

  • Translators

  • Testers

  • Community managers

  • Example creators

Q: How long until my PR is reviewed?

A: Usually within 1-2 weeks. High-priority items may be faster.

Q: Can I suggest a major feature?

A: Yes! Open an issue to discuss first. We appreciate your ideas.

Q: Do I need to sign a CLA?

A: Check the repository for current requirements.

Q: Can I contribute anonymously?

A: Contributions are tied to GitHub accounts, but you can use a pseudonym.


Resources


Thank You! ๐Ÿ™

Contributing to FluxSharp helps make it better for everyone. Your time and effort are greatly appreciated! Happy Contributing! ๐Ÿš€


Last Updated: April 9, 2026 Status: Active โœ… The FluxSharp project welcomes all contributions, from code to documentation to community support.