Skip to content

Commit 30a30b1

Browse files
committed
Add initial implementation
1 parent ac334c0 commit 30a30b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+9766
-7
lines changed

.github/workflows/static.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'arbi/**'
8+
- 'examples/**'
9+
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- 'arbi/**'
14+
- 'examples/**'
15+
16+
workflow_dispatch:
17+
18+
jobs:
19+
lint-and-audit:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Setup Rust Environment
26+
run: |
27+
# Install rustup
28+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
29+
. "$HOME/.cargo/env"
30+
31+
# Install clippy and rustfmt
32+
rustup component add clippy rustfmt
33+
34+
# Install cargo-audit
35+
cargo install cargo-audit
36+
37+
- name: clippy
38+
run: cargo clippy -- -D warnings
39+
40+
- name: rustfmt
41+
run: cargo fmt -- --check
42+
43+
- name: cargo-audit
44+
run: cargo audit

.github/workflows/test.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'arbi/**'
8+
- 'examples/**'
9+
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- 'arbi/**'
14+
- 'examples/**'
15+
16+
workflow_dispatch:
17+
18+
jobs:
19+
build-and-test:
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os: [ubuntu-latest, windows-latest, macos-latest]
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install Rust
29+
run: |
30+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
31+
shell: bash
32+
33+
- name: Run tests
34+
run: |
35+
cargo test --release
36+
37+
# # Run examples
38+
# for example in examples/*; do
39+
# if [ -f "$example/Cargo.toml" ]; then
40+
# cargo run --release --manifest-path "$example/Cargo.toml"
41+
# fi
42+
# done
43+
shell: bash

arbi/.cargo/config.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build]
2+
rustdocflags = [ "--html-in-header", "./arbi/doc/header.html" ]

arbi/Cargo.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ categories = [
44
"algorithms",
55
"data-structures",
66
"mathematics",
7+
"no-std",
78
]
89
description = "Arbitrary precision integer."
910
edition = "2021"
@@ -17,6 +18,12 @@ license = "Apache-2.0 OR MIT"
1718
name = "arbi"
1819
readme = "README.md"
1920
repository = "https://github.com/OTheDev/arbi"
20-
version = "0.1.0"
21+
version = "0.1.1"
2122

2223
[dependencies]
24+
25+
[dev-dependencies]
26+
rand = { version = "0.8.5", features = ["std_rng"] }
27+
28+
[package.metadata.docs.rs]
29+
rustdoc-args = ["--html-in-header", "./doc/header.html"]

0 commit comments

Comments
 (0)