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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@ dist/
logs
vscode-plugin
.loop

# Rust build artifacts
/target/
/.cargo/
/.rustup/
322 changes: 322 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[workspace]
resolver = "2"
members = [
"crates/fastled-cli",
"crates/fastled-py",
]

[workspace.package]
version = "2.0.6"
edition = "2021"
rust-version = "1.85"
license = "MIT"
repository = "https://github.com/zackees/fastled-wasm"
homepage = "https://github.com/zackees/fastled-wasm"

[workspace.dependencies]
pyo3 = { version = "0.23", features = ["abi3-py310"] }
clap = { version = "4", features = ["derive"] }
thiserror = "2"

[profile.release]
debug = "line-tables-only"
split-debuginfo = "packed"
strip = "none"
33 changes: 33 additions & 0 deletions _cargo
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# Trampoline: ensure the correct Rust toolchain is used.
# On Windows, Chocolatey may install a GNU-based Rust that conflicts with
# the MSVC toolchain required by this project. This script:
# 1. Puts the rustup-managed toolchain bin FIRST in PATH
# 2. Sets CARGO_BUILD_TARGET to force MSVC on Windows
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"

# Find rustup
RUSTUP="$(command -v rustup 2>/dev/null || true)"
if [ -z "$RUSTUP" ]; then
exec cargo "$@"
fi

# Get the toolchain's bin directory and prepend it to PATH
TOOLCHAIN_BIN="$($RUSTUP run "$(grep channel "$SCRIPT_DIR/rust-toolchain.toml" 2>/dev/null | head -1 | sed 's/.*"\(.*\)"/\1/')" rustc --print sysroot 2>/dev/null)/bin"
if [ -d "$TOOLCHAIN_BIN" ]; then
export PATH="$TOOLCHAIN_BIN:$PATH"
fi

# On Windows, force MSVC target to prevent GNU toolchain contamination
case "$(uname -s)" in
MINGW*|MSYS*|CYGWIN*)
ARCH="$(uname -m)"
if [ "$ARCH" = "x86_64" ]; then
export CARGO_BUILD_TARGET="x86_64-pc-windows-msvc"
else
export CARGO_BUILD_TARGET="aarch64-pc-windows-msvc"
fi
;;
esac

exec cargo "$@"
Loading
Loading