-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from dzcode-io/44-add-rust-support
added blank cargo package
- Loading branch information
Showing
9 changed files
with
91 additions
and
16 deletions.
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 |
---|---|---|
@@ -1,27 +1,31 @@ | ||
# Add 'data' to any changes within '_data' folder or any subfolders | ||
data: | ||
- _data/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "_data/**" | ||
|
||
# Add 'schemas' to any changes within '_schemas' folder or any subfolders | ||
schemas: | ||
- _schemas/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "_schemas/**" | ||
|
||
# Add 'csharp' to any changes within 'csharp' folder or any subfolders | ||
csharp: | ||
- csharp/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "csharp/**" | ||
|
||
# Add 'java' to any changes within 'java' folder or any subfolders | ||
java: | ||
- java/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "java/**" | ||
|
||
# Add 'javascript' to any changes within 'javascript' folder or any subfolders | ||
javascript: | ||
- javascript/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "javascript/**" | ||
|
||
# Add 'php' to any changes within 'php' folder or any subfolders | ||
php: | ||
- php/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "php/**" | ||
|
||
# Add 'python' to any changes within 'python' folder or any subfolders | ||
python: | ||
- python/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: "python/**" | ||
|
||
rust: | ||
- changed-files: | ||
- any-glob-to-any-file: "rust/**" |
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,12 +1,13 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
- pull_request | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@main | ||
- uses: actions/checkout@v4 | ||
- uses: actions/labeler@v5 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
sync-labels: true |
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,26 @@ | ||
name: "Rust Checks" | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/rust-checks.yml" | ||
- "rust/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_test: | ||
name: kuliya - latest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: cd rust && cargo build --verbose | ||
- run: cd rust && cargo test --verbose |
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 @@ | ||
target |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "kuliya" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
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,13 @@ | ||
# kuliya for Rust | ||
|
||
Algeria's college hierarchy dataset as Cargo package | ||
|
||
# Get started | ||
|
||
WIP | ||
|
||
# Contribute | ||
|
||
Please install Rust compiler using https://rustup.rs/ | ||
|
||
Feel free to ask for help in [#kuliya](https://dzcode.slack.com/archives/C01C0155CKC) group chat |
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,14 @@ | ||
pub fn add(left: usize, right: usize) -> usize { | ||
left + right | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
|
||
#[test] | ||
fn it_works() { | ||
let result = add(2, 2); | ||
assert_eq!(result, 4); | ||
} | ||
} |