-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This one is quite fast. If we ever need to do fast json parsing, this is the one for it.
- Loading branch information
Showing
4 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,84 @@ | ||
BasedOnStyle: Google | ||
--- | ||
# Language | ||
Standard: Cpp11 | ||
|
||
# Indentation | ||
IndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
AccessModifierOffset: -4 | ||
IndentCaseLabels: false | ||
NamespaceIndentation: None | ||
|
||
# Spacing | ||
UseTab: Never | ||
SpaceBeforeParens: ControlStatements | ||
SpacesBeforeTrailingComments: 1 | ||
SpaceInEmptyParentheses: false | ||
SpacesInAngles: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
SpacesInCStyleCastParentheses: false | ||
SpaceBeforeAssignmentOperators: true | ||
MaxEmptyLinesToKeep: 2 | ||
|
||
# Alignment | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlinesLeft: true | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
|
||
# Argument Packing | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
|
||
# Break handling | ||
ColumnLimit: 100 | ||
BreakBeforeBraces: Mozilla | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakConstructorInitializersBeforeComma: true | ||
AlwaysBreakTemplateDeclarations: true | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
Cpp11BracedListStyle: true | ||
|
||
# Break penalities | ||
PenaltyBreakBeforeFirstCallParameter: 200 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyExcessCharacter: 5 | ||
PenaltyReturnTypeOnItsOwnLine: 60 | ||
|
||
# Includes | ||
SortIncludes: true | ||
IncludeIsMainRegex: '([-_](test|fuzz_test))?$' | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
# Match local headers | ||
- Regex: '^"[[:alnum:]_]+\.h"$' | ||
Priority: 1 | ||
# Match project headers | ||
- Regex: '^"[[:alnum:]_]+/.+\.h"$' | ||
Priority: 2 | ||
# Match Qt headers | ||
- Regex: '^<Q[[:alnum:]_/]+>$' | ||
Priority: 3 | ||
# Match other headers | ||
- Regex: '.*' | ||
Priority: 4 | ||
|
||
# Short blocks | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
|
||
# Set pointer format | ||
DerivePointerAlignment: false | ||
PointerAlignment: Left | ||
|
||
# "const X" instead of "X const" | ||
QualifierAlignment: Left | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
|
||
cc_library( | ||
name = "simdjson", | ||
srcs = ["singleheader/simdjson.cpp"], | ||
hdrs = ["singleheader/simdjson.h"], | ||
includes = ["singleheader"], | ||
visibility = ["//visibility:public"], | ||
) |