Skip to content

Commit 2d37e28

Browse files
committed
Initial commit
0 parents  commit 2d37e28

52 files changed

Lines changed: 7640 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[target.wasm32-unknown-unknown]
2+
runner = "wasm-server-runner"
3+
# Needed for getrandom/uuid: https://github.com/uuid-rs/uuid/issues/792
4+
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']

.github/workflows/ci.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: --deny warnings
12+
RUSTDOCFLAGS: --deny warnings
13+
14+
jobs:
15+
# Check formatting.
16+
format:
17+
name: Format
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 30
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@stable
26+
with:
27+
components: rustfmt
28+
29+
- name: Run cargo fmt
30+
run: cargo fmt --all -- --check
31+
# Run clippy lints.
32+
clippy:
33+
name: Clippy
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 30
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: Install Rust toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
components: clippy
44+
45+
- name: Install dependencies
46+
run: sudo apt-get update; sudo apt-get install --no-install-recommends build-essential curl wget file libssl-dev
47+
48+
- name: Populate target directory from cache
49+
uses: Leafwing-Studios/cargo-cache@v2
50+
with:
51+
sweep-cache: true
52+
53+
- name: Install cargo-gpu
54+
run: |
55+
cargo install --git https://github.com/Rust-GPU/cargo-gpu cargo-gpu
56+
cargo gpu install --auto-install-rust-toolchain
57+
58+
- name: Run clippy lints
59+
run: cargo clippy --locked --workspace --all-targets -- --deny warnings
60+
61+
# Check documentation.
62+
doc:
63+
name: Docs
64+
runs-on: ubuntu-latest
65+
timeout-minutes: 30
66+
steps:
67+
- name: Checkout repository
68+
uses: actions/checkout@v4
69+
70+
- name: Install Rust toolchain
71+
uses: dtolnay/rust-toolchain@stable
72+
73+
- name: Install dependencies
74+
run: sudo apt-get update; sudo apt-get install --no-install-recommends build-essential curl wget file libssl-dev
75+
76+
- name: Populate target directory from cache
77+
uses: Leafwing-Studios/cargo-cache@v2
78+
with:
79+
sweep-cache: true
80+
81+
- name: Install cargo-gpu
82+
run: |
83+
cargo install --git https://github.com/Rust-GPU/cargo-gpu cargo-gpu
84+
cargo gpu install --auto-install-rust-toolchain
85+
86+
- name: Check documentation
87+
run: cargo doc --locked --workspace --document-private-items --no-deps
88+
# Testing.
89+
test:
90+
name: Tests
91+
runs-on: ubuntu-latest
92+
timeout-minutes: 30
93+
steps:
94+
- name: Checkout repository
95+
uses: actions/checkout@v4
96+
97+
- name: Install Rust toolchain
98+
uses: dtolnay/rust-toolchain@stable
99+
100+
- name: Install dependencies
101+
run: sudo apt-get update; sudo apt-get install --no-install-recommends build-essential curl wget file libssl-dev
102+
103+
- name: Populate target directory from cache
104+
uses: Leafwing-Studios/cargo-cache@v2
105+
with:
106+
sweep-cache: true
107+
- name: Install cargo-gpu
108+
run: |
109+
cargo install --git https://github.com/Rust-GPU/cargo-gpu cargo-gpu
110+
cargo gpu install --auto-install-rust-toolchain
111+
- name: Run Cargo Tests
112+
run: |
113+
cargo test --verbose

.gitignore

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
autogen/
6+
7+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
8+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
9+
Cargo.lock
10+
11+
# These are backup files generated by rustfmt
12+
**/*.rs.bk
13+
14+
# MSVC Windows builds of rustc generate these, which store debugging information
15+
*.pdb
16+
17+
.lock
18+
dist
19+
20+
*_bg.wasm
21+
website
22+
23+
# JetBrain IDEs
24+
#
25+
#
26+
#
27+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
28+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
29+
# and can be added to the global gitignore or merged into this file. For a more nuclear
30+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
31+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
32+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
33+
34+
# User-specific stuff
35+
.idea
36+
.idea/**/workspace.xml
37+
.idea/**/tasks.xml
38+
.idea/**/usage.statistics.xml
39+
.idea/**/dictionaries
40+
.idea/**/shelf
41+
42+
# AWS User-specific
43+
.idea/**/aws.xml
44+
45+
# Generated files
46+
.idea/**/contentModel.xml
47+
48+
# Sensitive or high-churn files
49+
.idea/**/dataSources/
50+
.idea/**/dataSources.ids
51+
.idea/**/dataSources.local.xml
52+
.idea/**/sqlDataSources.xml
53+
.idea/**/dynamic.xml
54+
.idea/**/uiDesigner.xml
55+
.idea/**/dbnavigator.xml
56+
57+
# Gradle
58+
.idea/**/gradle.xml
59+
.idea/**/libraries
60+
61+
# Gradle and Maven with auto-import
62+
# When using Gradle or Maven with auto-import, you should exclude module files,
63+
# since they will be recreated, and may cause churn. Uncomment if using
64+
# auto-import.
65+
# .idea/artifacts
66+
# .idea/compiler.xml
67+
# .idea/jarRepositories.xml
68+
# .idea/modules.xml
69+
# .idea/*.iml
70+
# .idea/modules
71+
# *.iml
72+
# *.ipr
73+
74+
# CMake
75+
cmake-build-*/
76+
77+
# Mongo Explorer plugin
78+
.idea/**/mongoSettings.xml
79+
80+
# File-based project format
81+
*.iws
82+
83+
# IntelliJ
84+
out/
85+
86+
# mpeltonen/sbt-idea plugin
87+
.idea_modules/
88+
89+
# JIRA plugin
90+
atlassian-ide-plugin.xml
91+
92+
# Cursive Clojure plugin
93+
.idea/replstate.xml
94+
95+
# SonarLint plugin
96+
.idea/sonarlint/
97+
98+
# Crashlytics plugin (for Android Studio and IntelliJ)
99+
com_crashlytics_export_strings.xml
100+
crashlytics.properties
101+
crashlytics-build.properties
102+
fabric.properties
103+
104+
# Editor-based Rest Client
105+
.idea/httpRequests
106+
107+
# Android studio 3.1+ serialized cache file
108+
.idea/caches/build_file_checksums.ser
109+
110+
.DS_store
111+
.claude

CHANGELOG.md

Whitespace-only changes.

Cargo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[workspace]
2+
members = [
3+
"crates/khal",
4+
"crates/khal-derive",
5+
"crates/khal-std",
6+
"crates/khal-example",
7+
"crates/khal-example-shaders",
8+
"crates/cargo-cuda", "crates/khal-builder",
9+
]
10+
resolver = "2"
11+
12+
[workspace.dependencies]
13+
bytemuck = { version = "1", features = ["derive", "extern_crate_std"] }
14+
anyhow = "1"
15+
async-channel = "2"
16+
thiserror = "2"
17+
18+
# TODO: make the wgpu dependency optional too (all backends should be optional but with
19+
# wgpu enabled by default).
20+
wgpu = { version = "29", features = ["naga-ir", "spirv"] }
21+
cudarc = { version = "0.19", features = ["driver", "nvrtc", "cuda-version-from-build-system"] }
22+
23+
[workspace.lints]
24+
rust.unexpected_cfgs = { level = "warn", check-cfg = [
25+
'cfg(feature, values("dim2", "dim3"))',
26+
'cfg(target_arch, values("spirv"))',
27+
] }
28+
29+
#[profile.release]
30+
#opt-level = 'z'
31+
32+
[patch.crates-io]
33+
#shader-slang = { path = "../slang-rs" }

0 commit comments

Comments
 (0)