-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bevy_args resource parsing plugin
- Loading branch information
Showing
19 changed files
with
571 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 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", | ||
# "-C", | ||
# "target-feature=+atomics,+bulk-memory,+mutable-globals", # for wasm-bindgen-rayon | ||
] | ||
|
||
|
||
# fix spurious network error on windows | ||
# [source.crates-io] | ||
# registry = "https://github.com/rust-lang/crates.io-index" | ||
|
||
[http] | ||
proxy = "" |
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,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 |
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,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" | ||
] | ||
} | ||
} | ||
} |
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,10 @@ | ||
services: | ||
devcontainer: | ||
build: | ||
context: . | ||
dockerfile: ./Dockerfile | ||
volumes: | ||
- type: bind | ||
source: .. | ||
target: /workspace | ||
command: sleep infinity |
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,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 |
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,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" |
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,43 @@ | ||
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] | ||
rust-toolchain: | ||
- nightly | ||
|
||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 120 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup ${{ matrix.rust-toolchain }} rust toolchain with caching | ||
uses: brndnmtthws/rust-action@v1 | ||
with: | ||
toolchain: ${{ matrix.rust-toolchain }} | ||
components: rustfmt, clippy | ||
enable-sccache: "true" | ||
|
||
- name: build | ||
run: cargo build --example=minimal | ||
|
||
- name: build (web) | ||
run: cargo build --example=minimal --target wasm32-unknown-unknown --release | ||
|
||
- name: lint | ||
run: cargo clippy -- -Dwarnings |
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,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 |
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,16 @@ | ||
debug/ | ||
target/ | ||
vendor/ | ||
out/ | ||
Cargo.lock | ||
**/*.rs.bk | ||
*.pdb | ||
|
||
*.py | ||
|
||
*.ply | ||
*.gcloud | ||
|
||
.DS_Store | ||
|
||
www/assets/ |
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,13 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "../" | ||
}, | ||
{ | ||
"path": "../../bevy" | ||
} | ||
], | ||
"settings": { | ||
"liveServer.settings.multiRootWorkspaceName": "bevy_gaussian_splatting" | ||
} | ||
} |
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,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 'bevy_gaussian_splatting'", | ||
"cargo": { | ||
"args": [ | ||
"test", | ||
"--no-run", | ||
"--lib", | ||
"--package=bevy_gaussian_splatting" | ||
], | ||
"filter": { | ||
"name": "bevy_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=bevy_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=bevy_gaussian_splatting" | ||
], | ||
"filter": { | ||
"name": "viewer", | ||
"kind": "bin" | ||
} | ||
}, | ||
"args": [], | ||
"cwd": "${workspaceFolder}", | ||
"env": { | ||
"CARGO_MANIFEST_DIR": "${workspaceFolder}", | ||
} | ||
} | ||
] | ||
} |
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,5 @@ | ||
{ | ||
"rust-analyzer.linkedProjects": [ | ||
"./Cargo.toml" | ||
] | ||
} |
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,80 @@ | ||
[package] | ||
name = "bevy_args" | ||
description = "bevy plugin to parse command line arguments and URL query parameters" | ||
version = "2.0.2" | ||
edition = "2021" | ||
authors = ["mosure <[email protected]>"] | ||
license = "MIT" | ||
keywords = [ | ||
"bevy", | ||
"args", | ||
"command-line-arguments", | ||
"query-parameters", | ||
] | ||
homepage = "https://github.com/mosure/bevy_args" | ||
repository = "https://github.com/mosure/bevy_args" | ||
readme = "README.md" | ||
exclude = [ | ||
".devcontainer", | ||
".github", | ||
"docs", | ||
"dist", | ||
"build", | ||
"assets", | ||
"credits", | ||
] | ||
|
||
|
||
[dependencies] | ||
clap = { version = "4.4", features = ["derive"] } | ||
serde = "1.0" | ||
serde_qs = "0.12" | ||
|
||
|
||
[dependencies.bevy] | ||
version = "0.12" | ||
default-features = false | ||
|
||
|
||
[target.'cfg(target_arch = "wasm32")'.dependencies] | ||
console_error_panic_hook = "0.1" | ||
wasm-bindgen = "0.2" | ||
|
||
|
||
[dependencies.web-sys] | ||
version = "0.3" | ||
features = [ | ||
'Document', | ||
'Element', | ||
'HtmlElement', | ||
'Location', | ||
'Node', | ||
'Window', | ||
] | ||
|
||
|
||
[profile.dev.package."*"] | ||
opt-level = 3 | ||
|
||
[profile.dev] | ||
opt-level = 1 | ||
|
||
[profile.release] | ||
lto = "thin" | ||
codegen-units = 1 | ||
opt-level = 3 | ||
|
||
[profile.wasm-release] | ||
inherits = "release" | ||
opt-level = "z" | ||
lto = "fat" | ||
codegen-units = 1 | ||
|
||
|
||
[lib] | ||
path = "src/lib.rs" | ||
|
||
|
||
[examples] | ||
name = "minimal" | ||
path = "examples/minimal.rs" |
Oops, something went wrong.