-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Alzymologist/release-0-1-0
Prepare for releasing
- Loading branch information
Showing
7 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
labels: ["dependabot"] | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
labels: ["dependabot-ci"] | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Check cargo deny | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
cargo-deny: | ||
name: Cargo deny | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
checks: | ||
- advisories | ||
|
||
continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
|
||
steps: | ||
- name: Checkout Sources | ||
uses: actions/[email protected] | ||
|
||
- name: Run cargo-deny | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: --manifest-path=./Cargo.toml check ${{ matrix.checks }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Rust clippy | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
linter: | ||
name: Cargo clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: cargo clippy | ||
run: cargo clippy --all-targets -- -D warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Rustfmt | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
rustfmt: | ||
name: Cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: cargo fmt | ||
run: cargo fmt --all -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Rust test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- stable | ||
|
||
jobs: | ||
check: | ||
name: Cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout sources | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 50 | ||
submodules: 'recursive' | ||
|
||
- name: Install Rust stable toolchain | ||
uses: actions-rs/[email protected] | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install cargo-nextest | ||
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: cargo-nextest | ||
version: 0.9 | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/[email protected] | ||
|
||
- name: cargo nextest | ||
run: cargo nextest run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
[package] | ||
description = "HAL to keep data in memory that could not be directly mapped to RAM" | ||
license = "GPL-3.0-or-later" | ||
name = "external-memory-tools" | ||
version = "0.1.0" | ||
authors = ["Alexander Slesarev <[email protected]>", "Vera Abramova <[email protected]>"] | ||
edition = "2021" | ||
repository = "https://github.com/Alzymologist/external-memory-tools" | ||
homepage = "https://github.com/Alzymologist/external-memory-tools" | ||
documentation = "https://docs.rs/external-memory-tools/" | ||
keywords = ["no_std", "baremetal", "memory", "secure"] | ||
exclude = ["/.github"] | ||
|
||
|
||
[features] | ||
default = ["std"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# External memory tools | ||
|
||
This is a tiny collections of tools useful to address memory that is not mapped directly into RAM. Do not use it unless you know exactly what you are doing, the cases where this is needed are very limited and mostly related to very special baremetal systems. | ||
|
||
## Brief explanation | ||
|
||
Rust allows neat memory allocations on no-std systems with the use of allocator abstraction; however, all normal tools assume that the memory that is addressed by that allocator could be low-level mapped into some address space. In some rare cases this is not possible (for example, in security vaults mapping arbitrary memory would present a direct breach to system security model). | ||
|
||
So if you happen to work with one of those systems and you find yourself repeating the same patterns over and over again - use this crate. | ||
|
||
## Usage | ||
|
||
Implement needed buffer access operations on your target memory and enjoy! | ||
|
||
To use this crate with regular memory (for simpler cross platformness), just use `()` as `External Memory` - feature is implemented there. Unfortunately, you would still have to include `()` as parameter in every affected function call. | ||
|
||
## Development | ||
|
||
Currently only read operations are supported; if you decide to contribute and add more features like writable and read-writeable buffers, please start hiding those under feature flags to keep things lean and safe. | ||
|