merge new structure for alpha release #51

Merged
PlexSheep merged 5 commits from devel into master 2024-01-17 14:37:38 +01:00
9 changed files with 42 additions and 38 deletions
Showing only changes of commit a4acae1580 - Show all commits

View File

@ -4,28 +4,27 @@ on:
branches: branches:
- master - master
#jobs: jobs:
# format: format:
# name: cargo CI name: cargo CI
# permissions: permissions:
# # Give the default GITHUB_TOKEN write permission to commit and push the # Give the default GITHUB_TOKEN write permission to commit and push the
# # added or changed files to the repository. # added or changed files to the repository.
# contents: write contents: write
# steps: steps:
# - name: get repo - name: get repo
# uses: actions/checkout@v4 uses: actions/checkout@v4
# - name: install rust - name: install rust
# uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
# - name: config custom registry - name: config custom registry
# run: | run: |
# mkdir -p ~/.cargo/ mkdir -p ~/.cargo/
# echo -e '[registry] echo "" > ~/.cargo/config.toml
# cscherr= "cscherr" echo "[registry]" >> ~/.cargo/config.toml
# echo 'cscherr = "cscherr"' >> ~/.cargo/config.toml
# [registries.cscherr] echo '[registries.cscherr]' >> ~/.cargo/config.toml
# index = "sparse+https://git.cscherr.de/api/packages/PlexSheep/cargo/" echo 'index = "https://git.cscherr.de/PlexSheep/_cargo-index.git"' >> ~/.cargo/config.toml
# ' > ~/.cargo/config.toml cat ~/.cargo/config.toml
# cat ~/.cargo/config.toml - name: publish crates on git.cscherr.de
# - name: publish crates on git.cscherr.de run: |
# run: | cargo workspaces publish --registry cscherr
# cargo workspaces publish --registry cscherr

View File

@ -1,4 +1,4 @@
name: Cargo Check, Format, Fix and Test name: cargo devel CI
on: on:
push: push:
branches: branches:
@ -22,11 +22,11 @@ jobs:
- name: config custom registry - name: config custom registry
run: | run: |
mkdir -p ~/.cargo/ mkdir -p ~/.cargo/
echo -e '[registry]\n\ echo "" > ~/.cargo/config.toml
cscherr= "cscherr"\n\ echo "[registry]" >> ~/.cargo/config.toml
echo 'cscherr = "cscherr"' >> ~/.cargo/config.toml
[registries.cscherr]\n\ echo '[registries.cscherr]' >> ~/.cargo/config.toml
index = "sparse+https://git.cscherr.de/api/packages/PlexSheep/cargo/"' > ~/.cargo/config.toml echo 'index = "https://git.cscherr.de/PlexSheep/_cargo-index.git"' >> ~/.cargo/config.toml
cat ~/.cargo/config.toml cat ~/.cargo/config.toml
- name: cargo check - name: cargo check
run: cargo check --all-features --all-targets run: cargo check --all-features --all-targets

View File

@ -55,7 +55,7 @@ math = []
log = [] log = []
bintols = [] bintols = []
net = [] net = []
bin = ["bintols", "math", "dep:clap", "dep:clap-num", "dep:clap-verbosity-flag"] bin = ["dep:clap", "dep:clap-num", "dep:clap-verbosity-flag"]
[lib] [lib]
name = "libpt" name = "libpt"
@ -68,10 +68,12 @@ crate-type = [
[[bin]] [[bin]]
name = "ccc" name = "ccc"
path = "src/ccc/mod.rs" path = "src/ccc/mod.rs"
required-features = ["bin", "math"]
[[bin]] [[bin]]
name = "hedu" name = "hedu"
path = "src/hedu/mod.rs" path = "src/hedu/mod.rs"
required-features = ["bin", "bintols"]
[dependencies] [dependencies]

View File

@ -6,7 +6,7 @@
//! This crate is currently empty. //! This crate is currently empty.
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use libpt_bintols::display::{bytes_to_bin, humanbytes}; use crate::display::{bytes_to_bin, humanbytes};
use libpt_log::{debug, error, info, trace, warn}; use libpt_log::{debug, error, info, trace, warn};
use std::io::{prelude::*, BufReader, Read, SeekFrom}; use std::io::{prelude::*, BufReader, Read, SeekFrom};

View File

@ -25,3 +25,4 @@ pub const YOBI: u128 = 2u128.pow(80);
// use libpt_core; // use libpt_core;
pub mod datalayout; pub mod datalayout;
pub mod display; pub mod display;
pub mod hedu;

View File

@ -19,8 +19,6 @@
#![warn(clippy::pedantic)] #![warn(clippy::pedantic)]
//// IMPORTS /////////////////////////////////////////////////////////////////////////////////////// //// IMPORTS ///////////////////////////////////////////////////////////////////////////////////////
use libpt_log;
use libpt_math;
//// TYPES ///////////////////////////////////////////////////////////////////////////////////////// //// TYPES /////////////////////////////////////////////////////////////////////////////////////////

View File

@ -15,6 +15,7 @@
#![warn(clippy::pedantic)] #![warn(clippy::pedantic)]
//// IMPORTS /////////////////////////////////////////////////////////////////////////////////////// //// IMPORTS ///////////////////////////////////////////////////////////////////////////////////////
pub mod ccc;
//// TYPES ///////////////////////////////////////////////////////////////////////////////////////// //// TYPES /////////////////////////////////////////////////////////////////////////////////////////

View File

@ -13,7 +13,7 @@
//// IMPORTS /////////////////////////////////////////////////////////////////////////////////////// //// IMPORTS ///////////////////////////////////////////////////////////////////////////////////////
use libpt::{hedu::*, log::*}; use libpt::{log::*, bintols::hedu::*};
use clap::Parser; use clap::Parser;
use clap_verbosity_flag::{InfoLevel, Verbosity}; use clap_verbosity_flag::{InfoLevel, Verbosity};
@ -88,6 +88,11 @@ pub struct Cli {
/// If left empty or set as "-", the program will read from stdin. /// If left empty or set as "-", the program will read from stdin.
pub data_source: Option<String>, pub data_source: Option<String>,
} }
impl Cli {
fn parse() -> Cli {
todo!()
}
}
//// IMPLEMENTATION //////////////////////////////////////////////////////////////////////////////// //// IMPLEMENTATION ////////////////////////////////////////////////////////////////////////////////

View File

@ -12,8 +12,6 @@ pub use libpt_bintols as bintols;
pub use libpt_ccc as ccc; pub use libpt_ccc as ccc;
#[cfg(feature = "core")] #[cfg(feature = "core")]
pub use libpt_core as core; pub use libpt_core as core;
#[cfg(feature = "hedu")]
pub use libpt_hedu as hedu;
#[cfg(feature = "log")] #[cfg(feature = "log")]
pub use libpt_log as log; pub use libpt_log as log;
#[cfg(feature = "math")] #[cfg(feature = "math")]