Skip to content

Commit

Permalink
feat: initial project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mosure committed Nov 15, 2023
1 parent d7ec3cd commit 43b9ced
Show file tree
Hide file tree
Showing 22 changed files with 415 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# alternatively, `export CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=wasm-server-runner`

[target.wasm32-unknown-unknown]
runner = "wasm-server-runner"
rustflags = ["--cfg=web_sys_unstable_apis"]


# fix spurious network error on windows
# [source.crates-io]
# registry = "https://github.com/rust-lang/crates.io-index"

[http]
proxy = ""
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/devcontainers/rust:0-1

WORKDIR /workspace

RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
build-essential \
libpulse-dev \
libdbus-1-dev \
libudev-dev \
libssl-dev \
xorg \
openbox \
alsa-tools \
librust-alsa-sys-dev \
&& rm -rf /var/lib/apt/lists/*

RUN rustup target install wasm32-unknown-unknown

RUN cargo install flamegraph
RUN cargo install wasm-server-runner
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"dockerComposeFile": ["docker-compose.yaml"],
"workspaceFolder": "/workspace",
"remoteUser": "vscode",
"shutdownAction": "stopCompose",
"service": "devcontainer",

"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/rust:1": "latest",
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
"plugins": "history history-substring-search"
}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"rust-lang.rust-analyzer",
"serayuzgur.crates",
"vadimcn.vscode-lldb"
]
}
}
}
10 changes: 10 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
devcontainer:
build:
context: .
dockerfile: ./Dockerfile
volumes:
- type: bind
source: ..
target: /workspace
command: sleep infinity
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.sh text eol=lf
*.conf text eol=lf

*.ply binary
*.splat binary
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
ignore:
# These are peer deps of Cargo and should not be automatically bumped
- dependency-name: "semver"
- dependency-name: "crates-io"
rebase-strategy: "disabled"
41 changes: 41 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: bench

on:
pull_request:
types: [ labeled, synchronize ]
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
bench:
if: contains(github.event.pull_request.labels.*.name, 'bench')

strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
timeout-minutes: 120

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}

- name: io benchmark
uses: boa-dev/[email protected]
with:
benchName: "io"
branchName: ${{ github.base_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
build:

strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
timeout-minutes: 120

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}

- name: check
run: cargo check

- name: build
run: cargo build

- name: lint
run: cargo clippy

- name: test
run: cargo test
24 changes: 24 additions & 0 deletions .github/workflows/todo_tracker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

name: 'todo tracker'

on:
push:
branches: [ main ]

jobs:
build:
permissions:
issues: write

name: todo_tracker
runs-on: [ubuntu-latest]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: "TODO to Issue"
uses: "alstr/todo-to-issue-action@v4"
id: "todo"
with:
AUTO_ASSIGN: true
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

*.py

*.ply
*.gcloud

.DS_Store
73 changes: 73 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'burn_gaussian_splatting'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=burn_gaussian_splatting"
],
"filter": {
"name": "burn_gaussian_splatting",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}",
"env": {
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
}
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'viewer'",
"cargo": {
"args": [
"build",
"--bin=viewer",
"--package=burn_gaussian_splatting"
],
"filter": {
"name": "viewer",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}",
"env": {
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
}
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'viewer'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=viewer",
"--package=burn_gaussian_splatting"
],
"filter": {
"name": "viewer",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}",
"env": {
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
}
}
]
}
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# contributing to burn_gaussian_splatting

![alt text](docs/notferris2.webp)

thank you for your interest in contributing to `burn_gaussian_splatting`! contributions of all forms are welcome and appreciated. this includes code contributions, bug reports, documentation, or any other form of support.

## getting started

as `burn_gaussian_splatting` is a smaller project, the contribution process is more informal. feel free to contribute in a way that aligns with your interests and expertise. if you have any questions or need guidance, don't hesitate to reach out.

## ways to contribute

1. **code contributions**: if you have improvements or new features in mind, feel free to open a pull request. for larger changes, it's a good idea to discuss them first through a github issue.

2. **bug reports**: if you find any bugs, please open an issue describing the problem, including any relevant details that could help in resolving it.

3. **documentation**: improvements or additions to documentation are always welcome. this can include both inline code comments and updates to readme or other markdown files.

4. **ideas and suggestions**: have ideas for new features or ways to improve the project? open an issue to discuss your suggestions!

## pull request process

1. ensure that any new code complies with the existing code style and structure.
2. update the readme.md or other documentation with details of changes, if applicable.
3. open a pull request with a clear description of the changes.

## questions?

if you're unsure about something or need help, feel free to open an issue asking for guidance. as the project grows, we aim to make contributing as accessible and straightforward as possible.

## code of conduct

while we don't have a formal code of conduct, we expect contributors to be respectful, open-minded, and collaborative. let's work together to maintain a welcoming and inclusive environment.
Loading

0 comments on commit 43b9ced

Please sign in to comment.