Skip to content

Commit 5f91e04

Browse files
committed
Initial project setup
0 parents  commit 5f91e04

File tree

10 files changed

+93
-0
lines changed

10 files changed

+93
-0
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Continuous Integration Checks
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
toolchain: [ stable ]
10+
include:
11+
- toolchain: stable
12+
check-fmt: true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout source code
16+
uses: actions/checkout@v3
17+
- name: Install Rust ${{ matrix.toolchain }} toolchain
18+
run: |
19+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
20+
rustup override set ${{ matrix.toolchain }}
21+
- name: Build on Rust ${{ matrix.toolchain }}
22+
run: cargo build --verbose --color always
23+
- name: Check formatting
24+
if: matrix.check-fmt
25+
run: rustup component add rustfmt && cargo fmt --all -- --check
26+
- name: Test on Rust ${{ matrix.toolchain }}
27+
run: cargo test
28+
- name: Cargo check release on Rust ${{ matrix.toolchain }}
29+
run: cargo check --release
30+
- name: Cargo check doc on Rust ${{ matrix.toolchain }}
31+
run: cargo doc --release

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[workspace]
2+
resolver = "2"
3+
members = [ "cli", "client", "server"]
4+
5+
[profile.release]
6+
panic = "abort"
7+
opt-level = 3
8+
lto = true
9+
10+
[profile.dev]
11+
panic = "abort"

cli/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "cli"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

cli/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

client/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "client"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

client/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: usize, right: usize) -> usize {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

rustfmt.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use_small_heuristics = "Max"
2+
fn_params_layout = "Compressed"
3+
hard_tabs = true
4+
use_field_init_shorthand = true
5+
max_width = 100
6+
match_block_trailing_comma = true
7+
# UNSTABLE: format_code_in_doc_comments = true
8+
# UNSTABLE: overflow_delimited_expr = true
9+
# UNSTABLE: comment_width = 100
10+
# UNSTABLE: format_macro_matchers = true
11+
# UNSTABLE: format_strings = true
12+
# UNSTABLE: group_imports = "StdExternalCrate"

server/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "ldk-node-server"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

server/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)