Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
flaub committed Feb 19, 2022
1 parent 1d0fc43 commit 5db38ec
Show file tree
Hide file tree
Showing 239 changed files with 17,537 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
build -c opt
build --announce_rc
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
build --incompatible_enable_cc_toolchain_resolution
#build --toolchain_resolution_debug
build --flag_alias=riscv_root=//bazel/toolchain/risc0:root
build --flag_alias=accel=//risc0/zkp/accel:flag

build:cpu --accel=cpu

build:clang-tidy --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect
build:clang-tidy --output_groups=report
build:clang-tidy --@bazel_clang_tidy//:clang_tidy_config=//:clang_tidy_config
build:clang-tidy --build_tag_filters=-skip_clang_tidy

build:ci --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
build:ci --output_groups=+rustfmt_checks
build:ci --@rules_rust//:rustfmt.toml=//bazel/rules/rust:rustfmt.toml

build:dbg -c dbg
build:dbg --strategy=ObjcLink=local
build:dbg --strategy=CppLink=local

try-import %workspace%/.bazelrc.local
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0.0
12 changes: 12 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
AlignOperands: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: true
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: true
PointerAlignment: Left

18 changes: 18 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
AnalyzeTemporaryDtors: false
Checks: >
-*
clang-diagnostic-*
clang-analyzer-*
bugprone-*
readability-*
-readability-convert-member-functions-to-static
-readability-magic-numbers
-readability-implicit-bool-conversion
-readability-function-cognitive-complexity
-bugprone-macro-parentheses
CheckOptions:
- key: bugprone-argument-comment.CommentBoolLiterals
value: "0"
HeaderFilterRegex: ""
UseColor: true
WarningsAsErrors: ""
30 changes: 30 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.rs]
indent_size = 4

[*.py]
indent_size = 4

[*.bazel]
indent_size = 4

[*.bzl]
indent_size = 4

[WORKSPACE]
indent_size = 4

[*.BUILD]
indent_size = 4

[*.s]
indent_size = 4
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: self-hosted

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Build & test
run: bazelisk test //... --config=ci --config=cpu
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*~
*.swp
*.swo
.bazelrc.local
.DS_Store
bazel-*
target/
tmp/
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"bazelbuild.vscode-bazel",
"EditorConfig.EditorConfig",
"james-yu.latex-workshop",
"kriegalex.vscode-cudacpp",
"matklad.rust-analyzer",
"ms-vscode.cpptools",
"stkb.rewrap",
"twxs.cmake",
"valentjn.vscode-ltex"
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"[rust]": {
"editor.formatOnSave": true
},
"[starlark]": {
"editor.formatOnSave": true
}
"files.eol": "\n"
}
6 changes: 6 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "clang_tidy_config",
data = [".clang-tidy"],
)
237 changes: 237 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5db38ec

Please sign in to comment.