Skip to content

Commit 28db818

Browse files
Initial release v1.0.0
0 parents  commit 28db818

26 files changed

Lines changed: 2452 additions & 0 deletions

.clang-format

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
AccessModifierOffset: -4
2+
AlignAfterOpenBracket: AlwaysBreak
3+
AllowShortFunctionsOnASingleLine: false
4+
BasedOnStyle: Microsoft
5+
BinPackArguments: false
6+
BinPackParameters: false
7+
BraceWrapping:
8+
AfterClass: true
9+
AfterControlStatement: true
10+
AfterEnum: true
11+
AfterNamespace: true
12+
AfterStruct: true
13+
AfterUnion: true
14+
AfterCaseLabel: true
15+
BeforeCatch: true
16+
BeforeElse: true
17+
IndentBraces: false
18+
SplitEmptyFunction: true
19+
SplitEmptyRecord: true
20+
BreakBeforeBraces: Custom
21+
ColumnLimit: 120
22+
Cpp11BracedListStyle: false
23+
FixNamespaceComments: true
24+
IndentCaseLabels: true
25+
IndentPPDirectives: AfterHash
26+
IndentWidth: 4
27+
MaxEmptyLinesToKeep: 1
28+
NamespaceIndentation: All
29+
PointerAlignment: Left
30+
SortIncludes: false
31+
SortUsingDeclarations: false
32+
SpaceAfterCStyleCast: false
33+
SpaceBeforeAssignmentOperators: true
34+
SpaceBeforeParens: Never
35+
SpaceInEmptyParentheses: false
36+
SpacesInCStyleCastParentheses: false
37+
SpacesInParentheses: true
38+
SpacesInSquareBrackets: false
39+
TabWidth: 4
40+
UseTab: false
41+
KeepEmptyLines:
42+
AtStartOfBlock: false
43+
AtStartOfFile: false
44+
AtEndOfFile: false
45+
CompactNamespaces: false
46+
ShortNamespaceLines: 0
47+
SpaceBeforeRangeBasedForLoopColon: true
48+
SpacesInContainerLiterals: false
49+
BreakConstructorInitializers: BeforeColon
50+
AlwaysBreakBeforeMultilineStrings: true
51+
AlwaysBreakTemplateDeclarations: Yes
52+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
53+
AllowAllConstructorInitializersOnNextLine: false
54+
PackConstructorInitializers: Never

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{cpp,hpp,h,cc,cxx,inl}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[{CMakeLists.txt,*.cmake}]
16+
indent_style = space
17+
indent_size = 4
18+
19+
[*.md]
20+
indent_style = space
21+
indent_size = 4
22+
trim_trailing_whitespace = false
23+
24+
[*.{yml,yaml}]
25+
indent_style = space
26+
indent_size = 2
27+
28+
[*.json]
29+
indent_style = space
30+
indent_size = 4

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Enforce LF line endings for all text files (matches .editorconfig)
2+
* text=auto eol=lf
3+
4+
# Windows-specific files that require CRLF
5+
*.bat text eol=crlf
6+
*.cmd text eol=crlf
7+
*.ps1 text eol=crlf
8+
9+
# Binary files
10+
*.png binary
11+
*.jpg binary
12+
*.jpeg binary
13+
*.gif binary
14+
*.ico binary
15+
*.exe binary
16+
*.dll binary
17+
*.so binary
18+
*.dylib binary
19+
*.a binary
20+
*.lib binary
21+
*.o binary
22+
*.obj binary
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug! Please fill out the information below to help us investigate.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Bug Description
15+
description: A clear and concise description of what the bug is.
16+
placeholder: Tell us what you see!
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: reproduction
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Steps to reproduce the behavior
25+
placeholder: |
26+
1. Include nfx-resource headers...
27+
2. Call nfx_embed_resources() in CMake...
28+
3. Use find() with resource name...
29+
4. See error...
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: expected
35+
attributes:
36+
label: Expected Behavior
37+
description: What did you expect to happen?
38+
placeholder: I expected...
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: actual
44+
attributes:
45+
label: Actual Behavior
46+
description: What actually happened?
47+
placeholder: Instead, I got...
48+
validations:
49+
required: true
50+
51+
- type: textarea
52+
id: code
53+
attributes:
54+
label: Code Sample
55+
description: Minimal code to reproduce the issue
56+
render: cpp
57+
placeholder: |
58+
#include <nfx/Resource.h>
59+
#include <iostream>
60+
61+
namespace myapp::resources {
62+
const std::vector<nfx::Resource>& all();
63+
const nfx::Resource* find(std::string_view name);
64+
}
65+
66+
int main() {
67+
// Your code here that reproduces the issue
68+
auto* res = myapp::resources::find("config.json");
69+
if (res) {
70+
std::cout << res->str() << '\n';
71+
}
72+
return 0;
73+
}
74+
validations:
75+
required: false
76+
77+
- type: dropdown
78+
id: os
79+
attributes:
80+
label: Operating System
81+
description: What OS are you running?
82+
options:
83+
- Windows
84+
- Linux
85+
- macOS
86+
- Other
87+
multiple: true
88+
validations:
89+
required: true
90+
91+
- type: input
92+
id: compiler
93+
attributes:
94+
label: Compiler
95+
description: Which compiler and version? (e.g., GCC 14.2.0, MSVC 19.44, Clang 19.1)
96+
placeholder: "GCC 14.2.0"
97+
validations:
98+
required: true
99+
100+
- type: input
101+
id: cmake
102+
attributes:
103+
label: CMake Version
104+
description: What version of CMake are you using?
105+
placeholder: "3.30.0"
106+
validations:
107+
required: false
108+
109+
- type: input
110+
id: version
111+
attributes:
112+
label: nfx-resource Version
113+
description: Which version of nfx-resource are you using?
114+
placeholder: "1.0.0"
115+
validations:
116+
required: true
117+
118+
- type: textarea
119+
id: additional
120+
attributes:
121+
label: Additional Context
122+
description: Add any other context about the problem here (error messages, stack traces, etc.)
123+
placeholder: Error output, logs, screenshots, etc.
124+
validations:
125+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discussions
4+
url: https://github.com/nfx-libs/nfx-resource/discussions
5+
about: Ask questions and discuss ideas with the community
6+
- name: 📚 Documentation
7+
url: https://nfx-libs.github.io/nfx-resource/
8+
about: Browse the full documentation
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a feature! Please describe what you'd like to see added.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: Is your feature request related to a problem? Please describe.
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: false
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: Describe the solution you'd like
25+
placeholder: I would like to see...
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives Considered
33+
description: Describe alternatives you've considered
34+
placeholder: I also thought about...
35+
validations:
36+
required: false
37+
38+
- type: textarea
39+
id: example
40+
attributes:
41+
label: API Example
42+
description: How would you like to use this feature? (code example)
43+
render: cpp
44+
placeholder: |
45+
#include <nfx/Resource.h>
46+
#include <iostream>
47+
48+
namespace myapp::resources {
49+
const std::vector<nfx::Resource>& all();
50+
const nfx::Resource* find(std::string_view name);
51+
}
52+
53+
int main() {
54+
// Example usage of proposed feature
55+
auto* res = myapp::resources::find("config.json");
56+
57+
// Your proposed API usage here
58+
59+
return 0;
60+
}
61+
validations:
62+
required: false
63+
64+
- type: dropdown
65+
id: priority
66+
attributes:
67+
label: Priority
68+
description: How important is this feature to you?
69+
options:
70+
- Critical - Blocking my use of the library
71+
- High - Would significantly improve my workflow
72+
- Medium - Nice to have
73+
- Low - Minor improvement
74+
validations:
75+
required: false
76+
77+
- type: dropdown
78+
id: breaking
79+
attributes:
80+
label: Breaking Change
81+
description: Would this be a breaking change to existing APIs?
82+
options:
83+
- "No - Fully backward compatible"
84+
- "Yes - Would break existing code"
85+
- "Not sure"
86+
validations:
87+
required: false
88+
89+
- type: textarea
90+
id: additional
91+
attributes:
92+
label: Additional Context
93+
description: Add any other context, screenshots, or references about the feature request here
94+
placeholder: Links to similar features in other libraries, use cases, etc.
95+
validations:
96+
required: false
97+
98+
- type: checkboxes
99+
id: contribution
100+
attributes:
101+
label: Contribution
102+
description: Would you be willing to contribute this feature?
103+
options:
104+
- label: I am willing to submit a pull request for this feature
105+
required: false

0 commit comments

Comments
 (0)