Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
8e6f740
Add icon, update tests to include enum BitField properties
dhadner Feb 3, 2026
8a2edf8
Make bitwise operators work more intuitively and more interoperably, …
dhadner Feb 3, 2026
f510e07
Updated icon
dhadner Feb 4, 2026
e2433e5
Add XML documentation for all public APIs
dhadner Feb 4, 2026
ebb282b
Ignore api keys
dhadner Feb 4, 2026
00dea7b
Update XML documentation
dhadner Feb 4, 2026
561d6a3
Adding some required documentation updates for release.
dhadner Feb 4, 2026
a541537
Add a nice check mark to the "Zero Performance Overhead" section.
dhadner Feb 4, 2026
27d807d
Added GitHub templates. Updated CHANGELOG to show that 0.9.2 will be…
dhadner Feb 4, 2026
a630498
Update SECURITY.md for a friendlier link to file a report.
dhadner Feb 4, 2026
810c741
Update to also support .NET 7 and .NET 8. Tests run under .NET 8, 9,…
dhadner Feb 4, 2026
8ec5ab3
Fix ci.yml workflow to not try to push to NuGet.
dhadner Feb 4, 2026
6ea468c
Add explicit badge for .NET 9 since it is officially supported until …
dhadner Feb 4, 2026
adba7e8
Re-enable local performance testing. Disable when running in a CI en…
dhadner Feb 5, 2026
4fc8eca
Deterministic builds
dhadner Feb 5, 2026
a2fb561
Clearify README instructions for saving generated files to disk and d…
dhadner Feb 5, 2026
6d204c8
Added support for signed properties in BitFields structs. Updated RE…
dhadner Feb 5, 2026
546e887
Update to support reserved bits and undefined bits with deterministic…
dhadner Feb 6, 2026
f7997c5
Clean up constructor APIs, add examples for floating point, network p…
dhadner Feb 7, 2026
4f6b955
Add .NET 7 SDK to make sure it builds there. Add .NET 8 and 10 SDKs …
dhadner Feb 7, 2026
7849655
Fix workflow CI failure, remove test output file from tracking, clean…
dhadner Feb 7, 2026
0bc7c58
Merge pull request #10 from dhadner/dev
dhadner Feb 7, 2026
aab08d9
Potential fix for code scanning alert no. 2: Workflow does not contai…
dhadner Feb 7, 2026
4bc5995
Add support for decimal type.
dhadner Feb 7, 2026
e988c46
Merge pull request #11 from dhadner/dev
dhadner Feb 7, 2026
0a9f767
Add support for the Half (16-bit) floating point type.
dhadner Feb 8, 2026
a6540e0
Changes for 0.9.4 - see CHANGELOG.md
dhadner Feb 10, 2026
2ca7208
Minor renaming for clarity
dhadner Feb 10, 2026
c1736a1
Better BitOrder naming.
dhadner Feb 10, 2026
199d095
Rough demo of BitFields.
dhadner Feb 11, 2026
fb6b203
Demo mostly complete.
dhadner Feb 11, 2026
74edb1b
Added BitFieldDiagram and documentation. Included demo example usage.
dhadner Feb 11, 2026
a56670a
Demo and BitFieldDiagram updates.
dhadner Feb 11, 2026
9589ca1
Add DemoWeb app - Blazor WASM with same functionality as the WPF Demo…
dhadner Feb 11, 2026
7fc12f3
Checkin for 0.9.4 release.
dhadner Feb 12, 2026
4e938f8
Delete typo file.
dhadner Feb 12, 2026
cf1f734
Link to video
dhadner Feb 12, 2026
1608e99
Merge pull request #12 from dhadner/main
dhadner Feb 12, 2026
addfb65
Merge pull request #13 from dhadner/dev
dhadner Feb 12, 2026
0c0796a
Fix .gitignore: use glob patterns for bin/obj/vs
dhadner Feb 12, 2026
a560b0b
Merge branch 'dev'
dhadner Feb 12, 2026
3342617
Update image links to use NuGet-approved URLs.
dhadner Feb 12, 2026
40ea5ee
Get DemoWeb up to par with DemoApp and fix struct Description display…
dhadner Feb 16, 2026
a6ed930
Merge branch 'dev' of https://github.com/dhadner/Stardust.Utilities i…
dhadner Feb 16, 2026
0499237
Merge latest from dev.
dhadner Feb 16, 2026
c831f55
Add Reload button to web app for .NET assembly reload since file chan…
dhadner Feb 16, 2026
66a7ba5
Refactoring some attribute access methods from the demo apps to the N…
dhadner Feb 27, 2026
2b8ae2f
Update Result to not automatically return empty arrays, empty string…
dhadner Feb 28, 2026
2b93a0a
Found and fixed an issue where 'anding' the mask with the value faile…
dhadner Mar 4, 2026
ecc564f
Suppress nuisance warning due to SonarQube bug in Visual Studio.
dhadner Mar 4, 2026
2f78f69
Update for 0.9.5.
dhadner Mar 4, 2026
65c439e
Ignore local .xlsx file.
dhadner Mar 4, 2026
e63bb66
Updated DemoWeb to remove references to deprecated features. Dealt w…
dhadner Mar 5, 2026
aa91b18
Add PRIVACY.md and final checklist updates for release of 0.9.5.
dhadner Mar 5, 2026
616fbb4
Fix dependency check failure. and doubled description lines in RFC Di…
dhadner Mar 5, 2026
00f8391
Fix demo deployment to use correct version of NuGet package.
dhadner Mar 5, 2026
7226423
Fix broken dependency submission action.
dhadner Mar 5, 2026
b656534
Another attempt to fix dependency checking.
dhadner Mar 5, 2026
cc4f6d0
Make the Edge browser incompatibility more user-friendly to fix by th…
dhadner Mar 5, 2026
843c64f
1) Update README to standardize the way we reference the other .md fi…
dhadner Mar 5, 2026
cd5417f
Support overlapping fields in BitFieldDiagram visualizer
dhadner Mar 5, 2026
b474678
Updated change log to current date, added additional items for 0.9.5.
dhadner Mar 5, 2026
a747e5f
BitFieldDiagram documentation updates that were missed for the 0.9.5 …
dhadner Mar 5, 2026
15716be
Enforce MustBe and default bits across all operations.
dhadner Mar 6, 2026
625139f
Use named SCREAMING_SNAKE_CASE constants for masks.
dhadner Mar 6, 2026
0ba9635
Add nint and nuint support with appropriate compiler warnings and err…
dhadner Mar 7, 2026
7c4b04e
Add new StorageType enum for the BitFieldsAttribute constructor to ma…
dhadner Mar 7, 2026
19fe0d6
Add NumericBitFields - pre-defined BitFields structs for non-integral…
dhadner Mar 7, 2026
e26858d
Fix constant naming (MAX_EXPONENT, MAX_TRUE_EXPONENT) to be consisten…
dhadner Mar 7, 2026
c1dcfac
Fix hidden ordering assumptions in the MapStorageTypeEnum code with r…
dhadner Mar 7, 2026
b6f8c49
Fix nuisance warnings during build due to lack of release tracking fi…
dhadner Mar 7, 2026
60c4de2
Refactor performance tests to use true inline masking and shifting ra…
dhadner Mar 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: Bug Report
about: Report a bug to help us improve Stardust.Utilities
title: '[BUG] '
labels: bug
assignees: ''
---

## Description

A clear and concise description of the bug.

## To Reproduce

Steps to reproduce the behavior:

1. Define a struct with `[BitFields(typeof(...))]`
2. Add properties with `[BitField(...)]` or `[BitFlag(...)]`
3. Call method '...'
4. See error

## Expected Behavior

A clear and concise description of what you expected to happen.

## Actual Behavior

What actually happened, including any error messages or stack traces.

## Code Sample

```csharp
// Minimal code to reproduce the issue
[BitFields(typeof(byte))]
public partial struct MyRegister
{
[BitFlag(0)] public partial bool Flag { get; set; }
}
```

## Generated Code (if applicable)

If the issue is with generated code, please include the relevant portion:

```csharp
// Paste generated code here (found in obj/Generated/...)
```

## Environment

- **Stardust.Utilities version**: [e.g., 0.9.2]
- **.NET version**: [e.g., .NET 10.0]
- **OS**: [e.g., Windows 11, macOS 14, Ubuntu 24.04]
- **IDE**: [e.g., Visual Studio 2026, VS Code, Rider]

## Additional Context

Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://github.com/dhadner/Stardust.Utilities/blob/main/README.md
about: Check the documentation before opening an issue
- name: Security Vulnerabilities
url: https://github.com/dhadner/Stardust.Utilities/security/advisories/new
about: Report security vulnerabilities privately (do NOT open a public issue)
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Feature Request
about: Suggest a new feature or enhancement for Stardust.Utilities
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Summary

A clear and concise description of the feature you'd like to see.

## Problem Statement

Describe the problem this feature would solve. What are you trying to accomplish that isn't possible or is difficult today?

**Example:** "I'm frustrated when I have to manually write boilerplate code for..."

## Proposed Solution

Describe the solution you'd like. How would this feature work?

```csharp
// Example of how you'd like to use the feature
[BitFields(typeof(byte))]
public partial struct MyRegister
{
// Proposed new attribute or syntax
}
```

## Alternatives Considered

Describe any alternative solutions or features you've considered. Why wouldn't these work as well?

## Use Case

Describe the real-world use case for this feature:

- What type of application would benefit? (e.g., hardware emulation, network protocols, file formats)
- How common is this need?
- Are there workarounds you're currently using?

## Additional Context

Add any other context, screenshots, or examples about the feature request here.

## Checklist

- [ ] I have searched existing issues to ensure this isn't a duplicate
- [ ] I have considered if this fits the library's scope (bit manipulation, error handling, big-endian types)
- [ ] I am willing to help implement this feature (optional)
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Question
about: Ask a question about using Stardust.Utilities
title: '[QUESTION] '
labels: question
assignees: ''
---

## Question

What would you like to know?

## Context

Provide context about what you're trying to accomplish:

- What feature are you using? (BitFields, Result types, Big-Endian types, Extensions)
- What have you tried so far?
- Have you checked the documentation?

## Code (if applicable)

```csharp
// Share relevant code if it helps explain your question
```

## Documentation Checked

- [ ] I have read the [README](https://github.com/dhadner/Stardust.Utilities/blob/main/README.md)
- [ ] I have read the relevant detailed docs:
- [ ] [BITFIELDS.md](https://github.com/dhadner/Stardust.Utilities/blob/main/BITFIELDS.md)
- [ ] [RESULT.md](https://github.com/dhadner/Stardust.Utilities/blob/main/RESULT.md)
- [ ] [ENDIAN.md](https://github.com/dhadner/Stardust.Utilities/blob/main/ENDIAN.md)
- [ ] [EXTENSIONS.md](https://github.com/dhadner/Stardust.Utilities/blob/main/EXTENSIONS.md)
- [ ] I have searched existing issues for similar questions
55 changes: 55 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Description

Please include a summary of the changes and which issue is fixed (if applicable).

Fixes # (issue number)

## Type of Change

Please check the relevant option:

- [ ] ?? Bug fix (non-breaking change that fixes an issue)
- [ ] ? New feature (non-breaking change that adds functionality)
- [ ] ?? Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] ?? Documentation update
- [ ] ?? Refactoring (no functional changes)
- [ ] ? Test additions or updates

## Changes Made

List the specific changes made:

-
-
-

## Testing

Please describe the tests you ran to verify your changes:

- [ ] Unit tests pass (`dotnet test`)
- [ ] New tests added for new functionality
- [ ] Manual testing performed

**Test Configuration:**
- .NET version:
- OS:

## Checklist

- [ ] My code follows the project's code style
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Screenshots (if applicable)

Add screenshots to help explain your changes if they affect visual output or generated code.

## Additional Notes

Add any other context about the pull request here.
16 changes: 16 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copilot Instructions

## General Guidelines
- Use plain text only in responses - do not use markdown hyperlinks. Output gets garbled when it contains hyperlinks due to a known bug.

## Project-Specific Rules
- The package version is defined in Directory.Build.props at the repo root. Demo app csproj files reference it via $(Version) automatically.
- Always use the local NuGet package for Stardust.Utilities. Do not change the version in Directory.Build.props unless asked.
- Only rebuild the NuGet package (Build-Combined-NuGetPackages.ps1) when generator code or library code changes. Demo app changes only need a regular dotnet build since the generator is already packaged.
- When generator changes are made, rebuild using .\Build-Combined-NuGetPackages.ps1 -SkipTests (version is read from Directory.Build.props automatically).
- When changing features (adding, modifying, removing), ensure that appropriate test coverage is also updated (added, modified, removed).
- Features that include user or external input will require fuzz testing to ensure robustness and correct operation.
- Ensure that the Stardust.Utilities project handles all conceivable issues elegantly; edge cases are not acceptable. The library and its demos must always work as expected to generate trust with users evaluating it.
- Don't let a human or downstream user find an error that unit testing could have caught.
- Don't run the Performance test category when initially checking for regressions. Only run it when you have a specific reason to check for performance regressions, as it takes a long time to run and times out the terminal.
- All constants (const fields and const locals) must use SCREAMING_SNAKE_CASE (e.g., SIZE_IN_BYTES, LAST_WORD_MASK, NORMALIZATION_AND_MASK). This applies to both generator source code and the code the generators emit.
74 changes: 28 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,55 @@
name: CI/CD
permissions:
contents: read

on:
push:
branches: [ main, master ]
tags: [ 'v*' ]
branches: [ main, master, dev ]
pull_request:
branches: [ main, master ]

env:
DOTNET_VERSION: '10.0.x'

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
- name: Setup .NET 7, 8, 9, and 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
dotnet-version: |
7.0.x
8.0.x
9.0.x
10.0.x

# Restore projects explicitly (not via solution) so SolutionPath is unset
# and the test project restores all three TFMs: net8.0, net9.0, net10.0.
- name: Restore Generator
run: dotnet restore Generators/Stardust.Generators.csproj

- name: Restore dependencies
run: dotnet restore
- name: Restore Library
run: dotnet restore Stardust.Utilities.csproj

- name: Restore Tests
run: dotnet restore Test/Stardust.Utilities.Tests.csproj

- name: Build Generator
run: dotnet build Generators/Stardust.Generators.csproj -c Release --no-restore

- name: Build Library
- name: 'Build Library (multi-target: net7.0, net8.0, net9.0, net10.0)'
run: dotnet build Stardust.Utilities.csproj -c Release --no-restore

- name: Build Tests
- name: 'Build Tests (multi-target: net8.0, net9.0, net10.0)'
run: dotnet build Test/Stardust.Utilities.Tests.csproj -c Release --no-restore

- name: Run Tests
run: dotnet test Test/Stardust.Utilities.Tests.csproj -c Release --no-build --verbosity normal

- name: Pack NuGet packages
if: startsWith(github.ref, 'refs/tags/v')
run: |
dotnet pack Generators/Stardust.Generators.csproj -c Release --no-build -o ./artifacts
dotnet pack Stardust.Utilities.csproj -c Release --no-build -o ./artifacts

- name: Upload artifacts
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./artifacts/*.nupkg
- name: Run Tests (.NET 8)
run: dotnet test Test/Stardust.Utilities.Tests.csproj -c Release --no-build --framework net8.0 --filter "Category!=Performance" --verbosity normal

publish:
needs: build
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: nuget-packages
path: ./artifacts

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Run Tests (.NET 9)
run: dotnet test Test/Stardust.Utilities.Tests.csproj -c Release --no-build --framework net9.0 --filter "Category!=Performance" --verbosity normal

- name: Publish to NuGet.org
run: |
dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Run Tests (.NET 10)
run: dotnet test Test/Stardust.Utilities.Tests.csproj -c Release --no-build --framework net10.0 --filter "Category!=Performance" --verbosity normal
44 changes: 44 additions & 0 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Dependency Submission

# Replaces GitHub's automatic NuGet dependency submission, which fails when
# demo apps reference a Stardust.Utilities version not yet on NuGet.org.
# This workflow packs the library locally first so all project restores succeed.
#
# After creating this workflow, disable the automatic NuGet submission at:
# Settings > Code security > Dependency graph > Automatic dependency submission
on:
push:
branches: [ main ]

permissions:
contents: write

jobs:
submit-nuget:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET 7, 8, 9, and 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.0.x
8.0.x
9.0.x
10.0.x

# Demo apps reference Stardust.Utilities via PackageReference using the
# version from Directory.Build.props. During development the version may
# not yet be published to NuGet.org. Build and pack the library locally
# so all project restores succeed.
- name: Pack library locally
run: dotnet pack Stardust.Utilities.csproj -c Release -o ./nupkg

- name: Register local NuGet source
run: dotnet nuget add source "${{ github.workspace }}/nupkg" --name local

- name: Submit dependencies
uses: advanced-security/component-detection-dependency-submission-action@v0.1.1
Loading
Loading