-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚾ Basic functionality #2
Open
janie177
wants to merge
32
commits into
main
Choose a base branch
from
basic-functionality
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 25 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
09331dc
Create open-source Rust crate template
MarijnS95 4eec799
README: Fix `Actions Status` badge link
MarijnS95 ff5fc71
Reformat `CODE_OF_CONDUCT.md` and `release.toml`
MarijnS95 58a7d5e
Bump actions/checkout from 3 to 4
dependabot[bot] 734ae5a
Merge pull request #1 from Traverse-Research/dependabot/github_action…
MarijnS95 dec0d19
dependabot: Only run `github-actions` check over `.github/workflows` …
MarijnS95 3be10af
Add MSRV test with minimal-version dependencies
MarijnS95 659cb32
cargo: Add `categories` and `keywords`
MarijnS95 4dfd256
Start
Jasper-Bekkers da76654
Start adding structs and error types.
janie177 743c8b5
Rebase on rust template and module refactors.
janie177 949254c
Initalize the init args with mostly zero versions so that the API cor…
janie177 50b1984
Add functions to query flip mode and artificial frame rate caps.
janie177 6fc03b4
Add a device adapter function to query endurance gaming.
janie177 c7ba3e2
Query LUIDs on windows and don't query at all on other platforms.
janie177 9a313e5
Fix the mysterious segfault and uninitialized error.
janie177 696c1b9
Initialize igcl with the correct major and minor version.
janie177 ff84676
Add a scope enum to let the user decide how to query settings.
janie177 e019842
Recursively query different scopes to get the global defined setting …
janie177 e359a18
Formatting.
janie177 8486410
fmt.
janie177 b6bf792
Formatting.
janie177 3371e14
Merge remote-tracking branch 'origin/main' into basic-functionality
janie177 075b454
Post rebase fixes.
janie177 82249b4
Appease clippy and don't use windows crate when not on windows.
janie177 b8903aa
Remove cargo lock from git.
janie177 e7e63ce
Merge includes.
janie177 0405b65
Fix some comments.
janie177 add0709
Apply feedback related to spacing and the num adapters field.
janie177 48a1931
Apply more feedback.
janie177 0e14e63
Return CStr instead of &[i8].
janie177 226b6c2
Undo clippy suggestion.
janie177 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
- package-ecosystem: github-actions | ||
directory: "/.github/workflows/" | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
rust: | ||
name: Lint Rust code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cargo fmt | ||
run: cargo fmt --all -- --check | ||
- name: Cargo clippy | ||
run: cargo clippy --workspace --all-targets -- -D warnings | ||
- name: Cargo test | ||
run: cargo test --workspace | ||
|
||
rust-msrv: | ||
name: Build-test MSRV (1.74) with minimal crate dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Generate minimal-version dependencies | ||
run: cargo -Zminimal-versions generate-lockfile | ||
- uses: dtolnay/[email protected] | ||
- name: Cargo check | ||
run: cargo check --workspace --all-targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
paths: "/Cargo.toml" | ||
|
||
jobs: | ||
Publish: | ||
if: github.repository_owner == 'Traverse-Research' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Publish | ||
run: cargo publish --token ${{ secrets.cratesio_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/target | ||
/Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[submodule "vendor/drivers.gpu.control-library"] | ||
path = vendor/drivers.gpu.control-library | ||
url = https://github.com/intel/drivers.gpu.control-library.git | ||
depth = 1 | ||
update = none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
janie177 marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
[package] | ||
name = "igcl-rs" | ||
version = "0.1.0" | ||
name = "igcl" | ||
version = "0.0.0" | ||
authors = ["Traverse Research <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT" | ||
homepage = "https://traverseresearch.nl" | ||
repository = "https://github.com/Traverse-Research/igcl-rs" | ||
description = "Bindings to Intel GPU Control Library" | ||
include = ["src", "LICENSE"] | ||
categories = ["external-ffi-bindings", "api-bindings", "graphics"] # https://crates.io/category_slugs | ||
keywords = ["intel", "igcl", "gpu"] | ||
|
||
[dependencies] | ||
anyhow = "1.0.79" | ||
libloading = "0.8" | ||
|
||
[target.'cfg(target_os = "windows")'.dependencies] | ||
windows = { version = "0.58.0", default-features = false, features = ["Win32_Foundation"] } | ||
|
||
[workspace] | ||
members = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Traverse Research BV | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# IGCL | ||
|
||
[![Actions Status](https://github.com/Traverse-Research/igcl-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/Traverse-Research/igcl-rs/actions) | ||
[![Latest version](https://img.shields.io/crates/v/igcl.svg?logo=rust)](https://crates.io/crates/igcl) | ||
[![Documentation](https://docs.rs/igcl/badge.svg)](https://docs.rs/igcl) | ||
[![MSRV](https://img.shields.io/badge/rustc-1.74.0+-ab6000.svg)](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html) | ||
[![Lines of code](https://tokei.rs/b1/github/Traverse-Research/igcl-rs)](https://github.com/Traverse-Research/igcl-rs) | ||
![MIT](https://img.shields.io/badge/license-MIT-blue.svg) | ||
[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4%20adopted-ff69b4.svg)](./CODE_OF_CONDUCT.md) | ||
|
||
[![Banner](banner.png)](https://traverseresearch.nl) | ||
|
||
Bindings to [Intel GPU Control Library (IGCL)]. | ||
|
||
## Usage | ||
|
||
Add this to your Cargo.toml: | ||
|
||
```toml | ||
[dependencies] | ||
igcl = "0.0.0" | ||
``` | ||
|
||
```rust | ||
// A code example | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's fill this in. |
||
``` | ||
|
||
[Intel GPU Control Library (IGCL)]: https://github.com/intel/drivers.gpu.control-library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <igcl_api.h> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pre-release-commit-message = "Release {{version}}" | ||
tag-message = "Release {{version}}" | ||
tag-name = "{{version}}" | ||
sign-commit = true | ||
sign-tag = true | ||
publish = false | ||
|
||
pre-release-replacements = [ | ||
{ file = "README.md", search = "igcl = .*", replace = "{{crate_name}} = \"{{version}}\"" }, | ||
] | ||
|
||
# cargo-release only allows using {{version}} in the commit title when creating one | ||
# commit across all released packages in this workspace (we only release one package | ||
# though), or by using the same version for all packages. | ||
# https://github.com/crate-ci/cargo-release/issues/540#issuecomment-1328769105 | ||
# https://github.com/crate-ci/cargo-release/commit/3af94caa4b9bbee010a5cf3f196cc4afffbaf192 | ||
consolidate-commits = false | ||
shared-version = true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a job that runs
api_gen
and compares the output, like some (but not all) of our other bindings crates.(In other words you can copy-paste the setup from one of the others we have!)