Skip to content

Commit 0c48768

Browse files
committed
Initial commit: Dendrite hardware discovery daemon
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
0 parents  commit 0c48768

Some content is hidden

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

51 files changed

+15752
-0
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[target.wasm32-unknown-unknown]
2+
rustflags = [
3+
"--cfg", "getrandom_backend=\"wasm_js\"",
4+
"--cfg=web_sys_unstable_apis",
5+
]

.github/workflows/deploy-pages.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Deploy Dendrite WASM frontend to GitHub Pages
2+
# Builds dendrite-web for wasm32 and deploys to GitHub Pages
3+
name: Deploy to GitHub Pages
4+
5+
on:
6+
push:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
# Allow only one concurrent deployment
11+
concurrency:
12+
group: "pages"
13+
cancel-in-progress: true
14+
15+
# Sets permissions of the GITHUB_TOKEN
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Install Rust
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
targets: wasm32-unknown-unknown
32+
33+
- name: Cache cargo registry and build
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
~/.cargo/registry
38+
~/.cargo/git
39+
~/.cargo/bin/wasm-bindgen
40+
~/.cargo/bin/wasm-bindgen-test-runner
41+
~/.cargo/.crates.toml
42+
~/.cargo/.crates2.json
43+
target
44+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
45+
restore-keys: |
46+
${{ runner.os }}-cargo-
47+
48+
- name: Install wasm-bindgen-cli
49+
run: |
50+
if ! command -v wasm-bindgen &> /dev/null; then
51+
cargo install wasm-bindgen-cli
52+
fi
53+
54+
- name: Build WASM
55+
run: |
56+
cargo build --target wasm32-unknown-unknown -p dendrite-web --release
57+
wasm-bindgen --out-dir web --target web --no-typescript target/wasm32-unknown-unknown/release/dendrite_web.wasm
58+
59+
- name: Setup Pages
60+
uses: actions/configure-pages@v4
61+
62+
- name: Upload artifact
63+
uses: actions/upload-pages-artifact@v3
64+
with:
65+
path: 'web'
66+
67+
deploy:
68+
environment:
69+
name: github-pages
70+
url: ${{ steps.deployment.outputs.page_url }}
71+
runs-on: ubuntu-latest
72+
needs: build
73+
steps:
74+
- name: Deploy to GitHub Pages
75+
id: deployment
76+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Rust build artifacts
2+
/target/
3+
**/*.rs.bk
4+
5+
# WASM build outputs (regenerated by CI)
6+
*.wasm
7+
*.wasm.d.ts
8+
/pkg/
9+
/web/pkg/
10+
/crates/dendrite-web/pkg/
11+
/web/dendrite*.js
12+
/web/dendrite*.d.ts
13+
14+
# Generated TypeScript bindings
15+
*.d.ts
16+
17+
# IDE
18+
.idea/
19+
.vscode/
20+
*.swp
21+
*.swo
22+
23+
# OS
24+
.DS_Store
25+
Thumbs.db
26+
27+
# TLS certificates (generated locally)
28+
*.pem
29+
certs/
30+
31+
# Local config overrides
32+
dendrite.local.toml

0 commit comments

Comments
 (0)