Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3,972 changes: 3,675 additions & 297 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ resolver = "2"
members = [
"crates/fastled-cli",
"crates/fastled-py",
"crates/fastled-tauri",
]

[workspace.package]
Expand Down
22 changes: 22 additions & 0 deletions crates/fastled-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "fastled-tauri"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "FastLED WASM viewer (Tauri webview)"

[[bin]]
name = "fastled-viewer"
path = "src/main.rs"

[build-dependencies]
tauri-build = { version = "2", features = [] }

[dependencies]
tauri = { version = "2", features = ["devtools"] }
serde = { workspace = true }
serde_json = { workspace = true }
clap = { workspace = true }
3 changes: 3 additions & 0 deletions crates/fastled-tauri/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
18 changes: 18 additions & 0 deletions crates/fastled-tauri/frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>FastLED Viewer</title>
<style>
body { margin: 0; background: #1a1a2e; color: #eee; font-family: sans-serif; display: flex; align-items: center; justify-content: center; height: 100vh; }
.loading { text-align: center; }
h1 { color: #00d4ff; }
</style>
</head>
<body>
<div class="loading">
<h1>FastLED Viewer</h1>
<p>Waiting for compiled output...</p>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions crates/fastled-tauri/gen/schemas/acl-manifests.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions crates/fastled-tauri/gen/schemas/capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2,244 changes: 2,244 additions & 0 deletions crates/fastled-tauri/gen/schemas/desktop-schema.json

Large diffs are not rendered by default.

2,244 changes: 2,244 additions & 0 deletions crates/fastled-tauri/gen/schemas/windows-schema.json

Large diffs are not rendered by default.

Binary file added crates/fastled-tauri/icons/icon.ico
Binary file not shown.
41 changes: 41 additions & 0 deletions crates/fastled-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
use clap::Parser;

#[derive(Parser)]
#[command(name = "fastled-viewer", version, about = "FastLED WASM native viewer")]
struct Cli {
/// Directory containing compiled frontend assets (fastled.js, fastled.wasm, index.html)
#[arg(long)]
frontend_dir: Option<String>,

/// Window title
#[arg(long, default_value = "FastLED Viewer")]
title: String,

/// Window width
#[arg(long, default_value = "800")]
width: u32,

/// Window height
#[arg(long, default_value = "600")]
height: u32,
}

fn main() {
let cli = Cli::parse();

tauri::Builder::default()
.setup(move |app| {
let mut builder = tauri::WebviewWindowBuilder::new(
app,
"main",
tauri::WebviewUrl::App("index.html".into()),
);
builder = builder
.title(&cli.title)
.inner_size(cli.width as f64, cli.height as f64);
builder.build()?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error running tauri application");
}
21 changes: 21 additions & 0 deletions crates/fastled-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://raw.githubusercontent.com/nicovince/tauri-docs/refs/heads/dev/src/content/docs/_schema/config.schema.json",
"productName": "FastLED Viewer",
"version": "2.0.6",
"identifier": "com.fastled.viewer",
"build": {
"frontendDist": "./frontend"
},
"app": {
"withGlobalTauri": true,
"windows": [],
"security": {
"csp": null
}
},
"bundle": {
"active": false,
"targets": "all",
"icon": []
}
}
Loading