Skip to content

Commit

Permalink
rename runtime and leetcode
Browse files Browse the repository at this point in the history
  • Loading branch information
SKTT1Ryze committed Oct 27, 2023
1 parent 0c35892 commit 5e1d063
Show file tree
Hide file tree
Showing 41 changed files with 25 additions and 392 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/frontend_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
toolchain: nightly
- name: Generate Undeads Json
run: cargo run && cp ./undeads.json ../frontend/
working-directory: ./runtime
working-directory: ./runtime-rs
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
toolchain: nightly
- name: Generate Undeads Json
run: cargo run && cp ./undeads.json ../frontend/
working-directory: ./runtime
working-directory: ./runtime-rs
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on: [pull_request]
name: Runtime Check
name: Rust Runtime Check
jobs:
runtime_check:
runs-on: ubuntu-latest
Expand All @@ -8,6 +8,6 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Execute Runtime
- name: Execute Rust Runtime
run: cargo run
working-directory: ./runtime
working-directory: ./runtime-rs
8 changes: 4 additions & 4 deletions .github/workflows/rust_clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
toolchain: nightly
- name: Setup Clippy
run: rustup component add clippy
- name: Clippy Check in LeetCode
- name: Clippy Check in Rust LeetCode
run: cargo clippy --all-targets --all-features -- -D warnings
working-directory: ./leetcode
- name: Clippy Check in Runtime
working-directory: ./leetcode-rs
- name: Clippy Check in Rust Runtime
run: cargo clippy --all-targets --all-features -- -D warnings
working-directory: ./runtime
working-directory: ./runtime-rs
8 changes: 4 additions & 4 deletions .github/workflows/rust_fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
toolchain: nightly
- name: Setup Rustfmt
run: rustup component add rustfmt
- name: Format Check in LeetCode
- name: Format Check in Rust LeetCode
run: cargo fmt --all -- --check
working-directory: ./leetcode
working-directory: ./leetcode-rs

- name: Format Check in Runtime
- name: Format Check in Rust Runtime
run: cargo fmt --all -- --check
working-directory: ./runtime
working-directory: ./runtime-rs
8 changes: 4 additions & 4 deletions .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Test in LeetCode
- name: Test in Rust LeetCode
run: cargo test
working-directory: ./leetcode
working-directory: ./leetcode-rs

- name: Test in Runtime
- name: Test in Rust Runtime
run: cargo test
working-directory: ./runtime
working-directory: ./runtime-rs
2 changes: 1 addition & 1 deletion frontend/run_dev.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
cd ../runtime
cd ../runtime-rs
cargo run
cp undeads.json ../frontend/
cd ../frontend
Expand Down
2 changes: 1 addition & 1 deletion leetcode/Cargo.toml → leetcode-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "leetcode"
name = "leetcode-rs"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ crate::derive_problem!(
Topic::Algorithms,
"Palindrome Number",
"Given an integer x, return true if x is a palindrome, and false otherwise.",
"Match".into()
"Math".into()
);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions runtime/Cargo.toml → runtime-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "runtime"
name = "runtime-rs"
version = "0.1.0"
edition = "2021"

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

[dependencies]
leetcode = { path = "../leetcode" }
leetcode-rs = { path = "../leetcode-rs" }
anyhow = "1.0.75"
log = "0.4.20"
simple_logger = "4.2.0"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion runtime/src/container.rs → runtime-rs/src/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
sync::{Arc, Mutex},
};

use leetcode::{problems::Problem, solutions::Solution};
use leetcode_rs::{problems::Problem, solutions::Solution};

#[derive(Default)]
pub struct Container {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::container::ContainerHandle;

use leetcode::{problems, solutions};
use leetcode_rs::{problems, solutions};

pub fn register_all(handle: ContainerHandle) -> anyhow::Result<()> {
handle.register_problem(|_| problems::two_sum::ProblemImpl)?;
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/serder.rs → runtime-rs/src/serder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use leetcode::problems::Problem;
use leetcode_rs::problems::Problem;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Default)]
Expand Down
Loading

0 comments on commit 5e1d063

Please sign in to comment.