Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaussian Splatting Utilities #1

Merged
merged 24 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
211bfe1
Initial commit
keyboardspecialist Dec 6, 2024
8996486
Created a workspace, updated deps, and renamed an improperly named file
weegeekps Jan 10, 2025
a2f3f04
Updated version, fixed license.
weegeekps Jan 15, 2025
2506096
Updated authors in Cargo.toml
weegeekps Jan 15, 2025
ded94b7
Added CONTRIBUTING.md and CODE_OF_CONDUCT.md
weegeekps Jan 15, 2025
88f3cc9
Ran clippy and cleaned up linting errors
weegeekps Jan 15, 2025
fc8cf13
Started the CI configuration.
weegeekps Jan 15, 2025
6f699d8
Added actions workflow
weegeekps Jan 15, 2025
8d7e72d
Fixing a linting error I missed.
weegeekps Jan 15, 2025
200b5c4
Fixed missing triple in CI build
weegeekps Jan 15, 2025
11263a2
Unblocking the build
weegeekps Jan 15, 2025
bec73ac
Fixing the CI build step for wasm-splats and adding a pack step
weegeekps Jan 15, 2025
7bf5223
Removing an unnecessary --out-dir command
weegeekps Jan 15, 2025
eed45ad
Making sure the build step for packaging is using release
weegeekps Jan 15, 2025
611ef98
Using rust-toolchain instead of actions-rs as latter is deprecated.
weegeekps Jan 15, 2025
509e0e0
Created integration tests
weegeekps Feb 10, 2025
ea9710b
Enabled git lfs in the CI build checkout step
weegeekps Feb 10, 2025
d1d86f2
Updated documentation.
weegeekps Feb 18, 2025
2f0be3b
Cleaned up what we expose via bindgen.
weegeekps Feb 18, 2025
d581a40
Fixing the unit tests.
weegeekps Feb 18, 2025
10b291c
Cleanup.
weegeekps Feb 19, 2025
df16000
Fixing a broken unit test.
weegeekps Feb 19, 2025
9b9581b
Added CHANGES.md and other cleanup.
weegeekps Feb 20, 2025
0d17266
Code review changes.
weegeekps Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# You may be asking, "wait, why is this here and not in the pacakge directories?"
# As of January 2025, [per-package targets](https://github.com/rust-lang/cargo/issues/9406) hasn't hit stable Rust. Once that hits, we can move this back into the package directories.

[build]
target = "wasm32-unknown-unknown"
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
time: "08:00"
open-pull-requests-limit: 10
60 changes: 60 additions & 0 deletions .github/workflows/wasm-splats-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# If you're adding a new package, you'll need to duplicate this workflow for it.
name: wasm-splats CI
on:
push:
paths:
- 'wasm-splats/**'
- '.github/workflows/wasm-splats-ci.yml'

jobs:
test_and_lint:
name: Testing and Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Install latest stable with wasm32-unknown-unknown
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Run rustfmt
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -Dwarnings

- name: Run wasm-splats tests
run: wasm-pack test --headless --chrome --firefox
working-directory: ./wasm-splats

pack:
name: Packaging for npm
runs-on: ubuntu-latest
needs: [ test_and_lint ]
steps:
- uses: actions/checkout@v2

- name: Install latest stable with wasm32-unknown-unknown
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Build wasm-splats
run: wasm-pack build ./wasm-splats --release --target web --scope cesium

# TODO: Get rid of this when I no longer need it.
# - name: Pack wasm-splats
# run: wasm-pack publish ./wasm-splats/pkg
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Rust
/target
**/*.rs.bk
Cargo.lock
bin/
pkg/
wasm-pack.log

# Rust Rover
.idea/
5 changes: 5 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Code of Conduct

One of Cesium's strengths is our community. Our contributors and users are pushing the 3D geospatial field to amazing new levels. We rely on an open, friendly, inclusive environment to facilitate this. As such, we follow the [Contributor Covenant](https://www.contributor-covenant.org/)'s [Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) to ensure a harassment-free experience in the Cesium community. Any unacceptable behavior can be confidentially sent to the core team at [email protected].

This applies to the main Cesium repo, forum, twitter, and all channels, including all repos in the [CesiumGS](https://github.com/CesiumGS) GitHub organization.
84 changes: 84 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Contribution Guide

Thanks for contributing to Cesium WASM Utilities. You rock! Are you

- [submitting an issue](#submitting-an-issue),
- [getting started contributing](#getting-started-contributing), or
- [opening a pull request](#opening-a-pull-request)?

To ensure an inclusive community, contributors and users in the Cesium community should follow the [code of conduct](./CODE_OF_CONDUCT.md).

## Submitting an Issue

If you have a question, do not submit an issue; instead, search the [Cesium community forum](https://community.cesium.com/). The forum is very active and there are years of informative archives, often with answers from the core Cesium team. If you do not find an answer to your question, start a new thread, and you'll likely get a quick response.

If you think you've found a bug in Cesium WASM Utilities, first search the [issues](https://github.com/CesiumGS/cesium/issues). If an issue already exists, please add a comment expressing your interest and any additional information. This helps us prioritize issues.

If a related issue does not exist, submit a new one. Please be concise and include as much of the following information as is relevant:

- Minimum amount of sample code (and data) shared through [Sandcastle](https://sandcastle.cesium.com).
- Screenshot or animated .gif if appropriate (try [LICEcap](http://www.cockos.com/licecap/)). For example, see [#3153](https://github.com/CesiumGS/cesium/issues/3153) in CesiumJS. Screenshots are particularly useful for exceptions and rendering artifacts. If it is a rendering artifact, also include the output of [webglreport.com](http://webglreport.com/).
- Link to the thread if this was discussed on the Cesium forum or elsewhere. For example, see [#3045](https://github.com/CesiumGS/cesium/issues/3045) in CesiumJS.
- Your operating system and version, browser and version, and video card. Are they all up-to-date? Is the issue specific to one of them?
- The version of Cesium. Did this work in a previous version?
- Ideas for how to fix or workaround the issue. Also mention if you are willing to help fix it. If so, the Cesium team can often provide guidance and the issue may get fixed more quickly with your help.

## Getting Started Contributing

Everyone is welcome to contribute to Cesium WASM Utilities!

In addition to contributing core Cesium WASM Utilities code, we appreciate many types of contributions:

- Being active on the [Cesium community forum](https://community.cesium.com/) by answering questions and providing input on Cesium's direction.
- Showcasing your Cesium apps on [Cesium blog](https://cesium.com/blog/categories/userstories/). Contact us at [email protected].
- Writing tutorials, creating examples, and improving the reference documentation. See the issues labeled [category - doc](https://github.com/CesiumGS/cesium/labels/category%20-%20doc).
- Submitting issues as [described above](#submitting-an-issue).
- Triaging issues. Browse the [issues](https://github.com/CesiumGS/cesium/issues) and comment on issues that are no longer reproducible or on issues which you have additional information.
- Creating ecosystem projects for [glTF](https://github.com/KhronosGroup/glTF/issues/456), [CZML](https://github.com/CesiumGS/cesium/wiki/CZML-Guide), and [3D Tiles](https://github.com/CesiumGS/3d-tiles).

For ideas for Cesium WASM Utilities code contributions, see:

- issues labeled [`good first issue`](https://github.com/CesiumGS/cesium/labels/good%20first%20issue) and
- issues labeled [`type - roadmap`](https://github.com/CesiumGS/cesium/labels/type%20-%20roadmap).

See the [README](README.md) for how to build and run Cesium on your system.

Always feel free to introduce yourself on the [Cesium community forum](https://community.cesium.com/) to brainstorm ideas and ask for guidance.

## Opening a Pull Request

We love pull requests. We strive to promptly review them, provide feedback, and merge. Interest in Cesium is at an all-time high so the core team is busy. Following the tips in this guide will help your pull request get merged quickly.

> If you plan to make a major change, please start a new thread on the [Cesium community forum](https://community.cesium.com/) first. Pull requests for small features and bug fixes can generally just be opened without discussion on the forum.

### Contributor License Agreement (CLA)

Before we can review a pull request, we require a signed Contributor License Agreement. There is a CLA for:

- [individuals](https://docs.google.com/forms/d/e/1FAIpQLScU-yvQdcdjCFHkNXwdNeEXx5Qhu45QXuWX_uF5qiLGFSEwlA/viewform) and
- [corporations](https://docs.google.com/forms/d/e/1FAIpQLSeYEaWlBl1tQEiegfHMuqnH9VxyfgXGyIw13C2sN7Fj3J3GVA/viewform).

This only needs to be completed once, and enables contributions to all of the projects under the [CesiumGS](https://github.com/CesiumGS) organization, including Cesium WASM Utilities. The CLA ensures you retain copyright to your contributions, and provides us the right to use, modify, and redistribute your contributions using the [Apache 2.0 License](LICENSE.md).

If you have any questions, feel free to reach out to [[email protected]](mailto:hello@cesium)!

### Pull Request Guidelines

Our code is our lifeblood so maintaining Cesium WASM Utilities' high code quality is important to us.

- Review the [Contributor Guide](./CONTRIBUTING.md). In addition to Cesium WASM Utilities specific topics, they contain a lot of general software development best practices.
- For an overview of our workflow see [GitHub pull request workflows](https://cesium.com/blog/2013/10/08/github-pull-request-workflows/).
- Pull request tips
- If your pull request fixes an existing issue, include a link to the issue in the description (like this: "Fixes [#1](https://github.com/CesiumGS/cesium/issues/1)"). Likewise, if your pull request fixes an issue reported on the Cesium forum, include a link to the thread.
- If your pull request needs additional work, include a [task list](https://github.com/blog/1375%0A-task-lists-in-gfm-issues-pulls-comments).
- Once you are done making new commits to address feedback, add a comment to the pull request such as `"this is ready"` since GitHub doesn't notify us about commits.
- Code and tests
- Follow the [Rust Style Guide](https://doc.rust-lang.org/nightly/style-guide/) and verify that your code passes [rustfmt](https://github.com/rust-lang/rustfmt).
- Verify that your code passes [clippy](https://doc.rust-lang.org/clippy/index.html).
- Verify that all tests pass, and write new tests with excellent code coverage for new code.
- Update the [CHANGES.md](CHANGES.md) file with a summary of your changes.
- If you added third-party libraries, including new version of existing libraries, update [LICENSE.md](LICENSE.md). Mention it in [CHANGES.md](CHANGES.md). If you plan to add a third-party library, start a [GitHub issue](https://github.com/CesiumGS/cesium-wasm-utils/issues/new) discussing it first.

### Code of Conduct

To ensure an inclusive community, contributors and users in the Cesium community should follow the [code of conduct](./CODE_OF_CONDUCT.md).
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[workspace]
resolver = "2"
members = [
"wasm-splats"
]

# Profiles must be set at the root level of the `Cargo.toml` file.
[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = 3
lto = true
codegen-units = 1
Loading