Skip to content

Commit

Permalink
docs(libmake): 🩹 updated terms
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Jan 17, 2024
1 parent 0faa165 commit 6af29df
Show file tree
Hide file tree
Showing 18 changed files with 196 additions and 199 deletions.
1 change: 0 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! This is the main function for the build script.
//!
Expand Down
1 change: 0 additions & 1 deletion examples/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

// Module Declarations
// Each `mod` statement declares a module in the current crate.
Expand Down
1 change: 0 additions & 1 deletion src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

use super::generator::{
generate_files, generate_from_csv, FileGenerationParams,
Expand Down
1 change: 0 additions & 1 deletion src/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

use figlet_rs::FIGfont;
use std::error::Error;
Expand Down
1 change: 0 additions & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

use clap::{Arg, ArgMatches, Command, Error};

Expand Down
1 change: 0 additions & 1 deletion src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

use super::interface::replace_placeholders;
use serde::{Deserialize, Serialize};
Expand Down
1 change: 0 additions & 1 deletion src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

use std::{
fs::File,
Expand Down
1 change: 0 additions & 1 deletion src/loggers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Application logging functionality
//!
Expand Down
1 change: 0 additions & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Macros for the `libmake` crate.
//!
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! # Libmake Application
//!
Expand Down
1 change: 0 additions & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

/// A macro for getting a configuration field from a configuration file.
pub mod get_config_field;
Expand Down
1 change: 0 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// These lines indicate the copyright of the software and its licensing terms.
// SPDX-License-Identifier: Apache-2.0 OR MIT indicates dual licensing under Apache 2.0 or MIT licenses.
// Copyright © 2024 LibMake. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

use std::env;
use std::fs::File;
Expand Down
19 changes: 12 additions & 7 deletions template/build.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// SPDX-FileCopyrightText: Copyright © 2023 {name}. All rights reserved.
// SPDX-License-Identifier: {license}

fn main() {
// println!("cargo:rerun-if-changed=src/lib.rs");
// println!("cargo:rerun-if-changed=build.rs");
}
// Copyright notice and licensing information.
// These lines indicate the copyright of the software and its licensing terms.
// Copyright © 2024 {name}. All rights reserved.
// SPDX-License-Identifier: {license}

//! This is the main function for the build script.
//!
//! Currently, it only instructs Cargo to re-run this build script if `build.rs` is changed.
fn main() {
// println!("cargo:rerun-if-changed=src/lib.rs");
// println!("cargo:rerun-if-changed=build.rs");
}
102 changes: 52 additions & 50 deletions template/criterion.tpl
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
// SPDX-FileCopyrightText: Copyright © 2023 {name}. All rights reserved.
// SPDX-License-Identifier: {license}

extern crate criterion;

use criterion::{criterion_group, criterion_main, Criterion};
use {name}::{run, {name}_vec, {name}_map, {name}_join};

fn {name}_vec_benchmark(c: &mut Criterion) {
c.bench_function("{name}_vec_macro", |b| {
b.iter(|| {
{name}_vec![1, 2, 3, 4, 5]
})
});
}

fn {name}_map_benchmark(c: &mut Criterion) {
c.bench_function("{name}_map_macro", |b| {
b.iter(|| {
{name}_map!["a" => 1, "b" => 2, "c" => 3, "d" => 4, "e" => 5]
})
});
}

fn {name}_join_benchmark(c: &mut Criterion) {
c.bench_function("{name}_join_macro", |b| {
b.iter(|| {
{name}_join!["a", "b", "c", "d", "e"]
})
});
}

fn {name}_benchmark(c: &mut Criterion) {
c.bench_function("{name}", |b| {
b.iter(|| {
for _ in 0..1000 {
run().unwrap();
}
})
});
}

criterion_group!(
{name}_macros_benchmark,
{name}_vec_benchmark,
{name}_map_benchmark,
{name}_join_benchmark,
{name}_benchmark
);
criterion_main!({name}_macros_benchmark);
// Copyright notice and licensing information.
// These lines indicate the copyright of the software and its licensing terms.
// Copyright © 2024 {name}. All rights reserved.
// SPDX-License-Identifier: {license}

extern crate criterion;

use criterion::{criterion_group, criterion_main, Criterion};
use {name}::{run, {name}_vec, {name}_map, {name}_join};

fn {name}_vec_benchmark(c: &mut Criterion) {
c.bench_function("{name}_vec_macro", |b| {
b.iter(|| {
{name}_vec![1, 2, 3, 4, 5]
})
});
}

fn {name}_map_benchmark(c: &mut Criterion) {
c.bench_function("{name}_map_macro", |b| {
b.iter(|| {
{name}_map!["a" => 1, "b" => 2, "c" => 3, "d" => 4, "e" => 5]
})
});
}

fn {name}_join_benchmark(c: &mut Criterion) {
c.bench_function("{name}_join_macro", |b| {
b.iter(|| {
{name}_join!["a", "b", "c", "d", "e"]
})
});
}

fn {name}_benchmark(c: &mut Criterion) {
c.bench_function("{name}", |b| {
b.iter(|| {
for _ in 0..1000 {
run().unwrap();
}
})
});
}

criterion_group!(
{name}_macros_benchmark,
{name}_vec_benchmark,
{name}_map_benchmark,
{name}_join_benchmark,
{name}_benchmark
);
criterion_main!({name}_macros_benchmark);
Loading

0 comments on commit 6af29df

Please sign in to comment.