Skip to content

Commit

Permalink
Rust 🦀 (#3)
Browse files Browse the repository at this point in the history
* First rust code

* Main menu

* Deleted TS version, Finished first Rust version

* Add CI

* Fix CI

* Upload artifacts
  • Loading branch information
1Revenger1 authored Aug 12, 2021
1 parent ea394cc commit 27c684a
Show file tree
Hide file tree
Showing 13 changed files with 1,057 additions and 1,443 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Release

on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]

jobs:
release:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: nvcap_calculator
asset_name: nvcap_calculator_linux_amd64
- os: macos-latest
artifact_name: nvcap_calculator
asset_name: nvcap_calculator_macos_amd64
- os: windows-latest
artifact_name: nvcap_calculator.exe
asset_name: nvcap_calculator_windows_amd64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Project
run: cargo build --release --locked
- name: Upload binary to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.asset_name }}
path: target/release/${{ matrix.artifact_name }}


6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**/*.rom
**/.DS_STORE
node_modules/
node_modules/

# Added by cargo

/target
180 changes: 180 additions & 0 deletions Cargo.lock

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

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "nvcap_calculator"
version = "2.0.0"
authors = ["Avery Black <[email protected]>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
colored = "2"
chrono = "0.4"
ctrlc = "3.2.0"
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ This is a simple script which reads an Nvidia GPU VBIOS and calculates an NVCAP

This is compatible with GTX 4xx series GPUs and older, and works with both laptop and desktop GPUs.

To use this program, you need node.js. To run, you'll want to clone this project, run `npm install`, then `npm run run` OR `node index.js`. Building is not required, but this can be built using typescript. `tsc` will automatically generate `index.js`, but `npm run build` will compile and run in one command if preferred.

Once running, give it a VBIOS file, and then select `3` once it dumps you to the main menu again. From there, you need to assign each Display (at the top) to a head.
Once running, give it a VBIOS file, and then select `2` once it dumps you to the main menu again. From there, you need to assign each Display (at the top) to a head.

When parsing the VBIOS, the script automatically merges DCB entries with the same type and bus index and presents them as a single Display. If the bus index is the same, but are differing types, this will be presented as a single DVI Display.

Expand Down
Loading

0 comments on commit 27c684a

Please sign in to comment.