Skip to content
Open
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
9 changes: 9 additions & 0 deletions .cargo/config.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copy to config.toml and set your OpenCL.lib path (Windows MSVC build).
# CI uses RUSTFLAGS instead; this file is for local dev builds.
#
# copy .cargo\config.toml.example .cargo\config.toml
#
# Or run: scripts\mining-amd\INSTALL-OPENCL-SDK.bat

[target.x86_64-pc-windows-msvc]
rustflags = ["-Clink-arg=/LIBPATH:C:\\path\\to\\vcpkg\\installed\\x64-windows\\lib"]
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

env:
CARGO_TERM_COLOR: always

jobs:
test-app:
name: Tests (app crate)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run app tests
run: cargo test -p app --lib

build-miner-panel:
name: Build miner-panel (no OpenCL link)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build GUI
run: cargo build --release -p miner-panel
95 changes: 95 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Release (Windows miner)

on:
push:
tags:
- "v*"
workflow_dispatch:

permissions:
contents: write

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
build-windows:
name: Build & package (Windows x64)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: "release-windows-ocl"

- name: Install OpenCL.lib (vcpkg)
shell: pwsh
run: |
$vcpkgRoot = "$env:GITHUB_WORKSPACE\vcpkg-ci"
git clone --depth 1 https://github.com/microsoft/vcpkg.git $vcpkgRoot
& "$vcpkgRoot\bootstrap-vcpkg.bat" -disableMetrics
& "$vcpkgRoot\vcpkg.exe" install opencl:x64-windows
$lib = "$vcpkgRoot\installed\x64-windows\lib"
"LIB=$lib" | Out-File -FilePath $env:GITHUB_ENV -Append
"RUSTFLAGS=-Clink-arg=/LIBPATH:$lib" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Build miners + fullnode (OpenCL)
run: cargo build --release --features ocl

- name: Build miner-panel (GUI)
run: cargo build --release -p miner-panel

- name: Package release ZIPs (full + miner-only)
shell: pwsh
run: |
$version = "${{ github.ref_name }}"
if ($version -eq "${{ github.ref }}") { $version = "manual" }
& "$env:GITHUB_WORKSPACE\scripts\pack-release.ps1" -Version $version

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hacash-miner-windows-x64
path: dist/*.zip
retention-days: 30

- name: Publish GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: dist/*.zip
generate_release_notes: true
body: |
## HAC Miner — Windows x64 · By Mosky

Choose the package that fits your PC:

| Download | When to use |
|----------|-------------|
| **`hacash-miner-full-*.zip`** | **Clean PC** — fullnode + miners + GUI + `SETUP.bat` |
| **`hacash-miner-only-*.zip`** | You **already have** `hacash.exe` + `hacash.config.ini` |

### Full package (recommended for new users)
1. Extract `hacash-miner-full-*.zip`
2. Run **`SETUP.bat`**
3. Open **`miner-panel.exe`** → Settings → wallet → Start

### Miner only (existing fullnode)
1. Extract `hacash-miner-only-*.zip` next to your fullnode **or** any folder
2. Run **`SETUP-MINER.bat`**
3. Ensure fullnode RPC is on `127.0.0.1:8080`
4. Open **`miner-panel.exe`**

### Requirements
- Windows 10/11 x64
- AMD Adrenalin or NVIDIA drivers (GPU / OpenCL)
- Visual C++ Redistributable 2015–2022 x64 (setup scripts can install)

[docs/MINING-AMD.md](docs/MINING-AMD.md)
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,32 @@ vscode-*/
vendor/

dist/
.cargo/config.toml
.tools/
vcpkg-ci/

# Local dev / test noise
*.log
*.err
*.err.log
*.out.log
build*.txt
*_output.txt
*_out.txt
*_err.txt
pw*.log
pw*.err
target2/
*.vbs
x16rs/opencl/*.bin
demo_*.txt
test*.txt
lib_out.txt
rebuild_output.txt
cargo_build_output.txt
build-miner-panel.log
build-panel.log
miner-panel-build.log

*.geany
*.config.ini
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition = "2024"
resolver = "2"
members = [
".",
"miner-panel",
"app",
"node",
"chain",
Expand Down
13 changes: 13 additions & 0 deletions LIST-OPENCL.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@echo off
setlocal
title OpenCL devices
cd /d "%~dp0"
if not exist "list_opencl.exe" (
echo list_opencl.exe not found.
pause
exit /b 1
)
list_opencl.exe
echo.
pause
exit /b 0
30 changes: 30 additions & 0 deletions README-MINER-ONLY.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
HAC Miner — WORKERS ONLY (Windows x64)
By Mosky
======================================

FOR: You already run hacash.exe fullnode + hacash.config.ini

QUICK START
-----------
1. Extract ZIP to a folder
2. Run SETUP-MINER.bat
3. Open miner-panel.exe → Settings → Start

INCLUDED
--------
miner-panel.exe GUI
poworker.exe HAC miner
diaworker.exe HACD miner
list_opencl.exe GPU device list
x16rs/opencl/ OpenCL kernels

NOT INCLUDED (you must have these)
----------------------------------
hacash.exe Fullnode
hacash.config.ini Wallet + [server] RPC port 8080

Default connect: 127.0.0.1:8080

CLEAN PC?
---------
Download hacash-miner-FULL-windows-x64.zip instead.
31 changes: 31 additions & 0 deletions README-RELEASE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
HAC Miner — FULL PACKAGE (Windows x64)
By Mosky
======================================

FOR: Clean PC — everything in one ZIP

QUICK START
-----------
1. Extract ZIP to a folder (e.g. C:\HacashMiner)
2. Run SETUP.bat
3. Open miner-panel.exe → Settings → wallet → Start

INCLUDED
--------
hacash.exe Fullnode (solo RPC port 8080)
miner-panel.exe GUI setup + dashboard
poworker.exe HAC block miner
diaworker.exe HACD diamond miner
list_opencl.exe GPU platform/device list
SETUP.bat First-time setup
x16rs/opencl/ OpenCL kernels

ALREADY HAVE FULLNODE?
----------------------
Download hacash-miner-ONLY-windows-x64.zip (smaller, no hacash.exe)

REQUIREMENTS
------------
Windows 10/11 x64
GPU drivers with OpenCL (AMD Adrenalin or NVIDIA)
Visual C++ Redistributable 2015-2022 x64 (SETUP.bat can install)
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
Hacash Fullnode
HAC Miner Panel · By Mosky
===

Hacash fullnode + **OpenCL miners** (AMD / NVIDIA) + **GUI panel** for easy setup.

### Downloads (GitHub Releases)

| Package | Use when |
|---------|----------|
| **`hacash-miner-full-windows-x64.zip`** | Clean PC — includes `hacash.exe`, workers, panel, `SETUP.bat` |
| **`hacash-miner-only-windows-x64.zip`** | You already run the fullnode — workers + panel only |

After extract: run **`SETUP.bat`** (full) or **`SETUP-MINER.bat`** (miner-only), then **`miner-panel.exe`**.

### AMD / Ryzen mining (HAC + HACD)

Official miners use **OpenCL** (AMD Radeon + Ryzen CPU). Not CUDA.

See **[docs/MINING-AMD.md](docs/MINING-AMD.md)** and `scripts/mining-amd/` for build scripts, GPU configs, and `list_opencl` device discovery.

**Maintainers:** `git tag v0.4.0 && git push origin v0.4.0` → GitHub Actions builds both ZIPs (`.github/workflows/release.yml`).

### Module Architecture

Expand Down
Loading
Loading