Skip to content

Commit a0a0897

Browse files
committed
Release v1.2.0
0 parents  commit a0a0897

3,519 files changed

Lines changed: 796445 additions & 0 deletions

File tree

Some content is hidden

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

.cargo/audit.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[advisories]
2+
ignore = [
3+
"RUSTSEC-2023-0071", # rsa Marvin Attack - no fix available yet
4+
]
5+
# Ignore informational warnings (unmaintained, unsound notices)
6+
informational_warnings = []
7+
8+
[yanked]
9+
enabled = false # critical-section 1.1.3 is yanked but still functional

.cargo/config.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: 2024 Foundation Devices, Inc. <hello@foundation.xyz>
2+
# SPDX-FileCopyrightText: 2022 bunnie <bunnie@kosagi.com>
3+
# SPDX-FileCopyrightText: 2020 Sean Cross <sean@xobs.io>
4+
# SPDX-License-Identifier: MIT OR Apache-2.0
5+
6+
[unstable]
7+
trim-paths = true
8+
9+
[alias]
10+
xtask = "run --package xtask --"
11+
12+
[env]
13+
CC_armv7a_unknown_xous_elf = "arm-none-eabi-gcc"
14+
15+
[net]
16+
git-fetch-with-cli = true
17+
18+
[target.'armv7a-unknown-xous-elf']
19+
rustflags = [
20+
"--cfg", "keyos",
21+
'--cfg=curve25519_dalek_backend="serial"',
22+
'-Z', 'stack-protector=strong',
23+
]
24+
25+
[build]
26+
rustflags = ['--cfg=curve25519_dalek_backend="serial"']

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-FileCopyrightText: 2025 Foundation Devices, Inc. <hello@foundation.xyz>
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
target
5+
**/*.rs.bk
6+
7+
Dockerfile
8+
.dockerignore

.gitattributes

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
# Set default behavior for all files
3+
* text=auto eol=lf
4+
5+
# Various C code
6+
*.h text eol=lf
7+
*.c text eol=lf
8+
*.s text eol=lf
9+
*.S text eol=lf
10+
11+
# Rust code
12+
*.rs text eol=lf
13+
*.toml text eol=lf
14+
*.lock text eol=lf
15+
16+
# Misc scripting files
17+
Makefile text eol=lf
18+
*.mk text eol=lf
19+
*.sh text eol=lf
20+
*.ps1 text eol=crlf
21+
*.py text eol=lf
22+
23+
# Human-readable files
24+
*.md eol=lf
25+
README.* text eol=lf
26+
LICENSE text eol=lf
27+
*.txt text eol=lf
28+
29+
# Binary files
30+
*.dfu binary
31+
*.png binary
32+
*.jpg binary
33+
*.bin binary
34+
*.elf binary
35+
imports/qbsdiff/assets/samples/*.s binary
36+
37+
# Git configuration files
38+
.gitignore text eol=lf
39+
.gitattributes text eol=lf
40+
41+
# System description files
42+
*.svd eol=lf
43+
44+
# JSON
45+
*.json eol=lf

.githooks/commit-msg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
# SPDX-FileCopyrightText: 2024 Foundation Devices, Inc. <hello@foundationdevices.com>
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
commit_regex="^[^#]*[A-Z]+[0-9]*-[0-9]+"
6+
7+
if ! grep -iqE "$commit_regex" $1; then
8+
echo "=========================================================================================" >&2
9+
echo "Aborting commit. Your commit message must contain a Linear issue ID" >&2
10+
echo "Example: 'SFT-123: ' (To commit anyway, use the --no-verify option)" >&2
11+
echo "=========================================================================================" >&2
12+
exit 1
13+
fi

.githooks/pre-commit

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
# SPDX-FileCopyrightText: 2024 Foundation Devices, Inc. <hello@foundationdevices.com>
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
branch=`git symbolic-ref HEAD`
6+
if [ "$branch" = "refs/heads/main" ] || [[ "$branch" == refs/heads/dev-v* ]]; then
7+
echo "Direct commits to the main and dev branches are not allowed."
8+
exit 1
9+
fi
10+
11+
# Check lints
12+
echo Formatting and running lints...
13+
just short-lint
14+
if [ $? -eq 0 ]
15+
then
16+
echo -e "Lint succeeded."
17+
exit 0
18+
else
19+
just fmt
20+
echo -e "\n=======================================================" >&2
21+
echo -e "Lint failed. 'just fmt' was run automatically, add the changes and try again." >&2
22+
echo -e "=======================================================\n" >&2
23+
exit 1
24+
fi
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-FileCopyrightText: 2025 Foundation Devices, Inc. <hello@foundation.xyz>
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
name: 'Setup Nix and Rust'
5+
inputs:
6+
rust-cache-key:
7+
description: 'Key suffix for Rust cache'
8+
required: false
9+
default: ${{ github.workflow }}
10+
setup-git-auth:
11+
description: 'Setup Git credentials via gh CLI'
12+
required: false
13+
default: 'true'
14+
15+
runs:
16+
using: "composite"
17+
steps:
18+
- name: Check if Nix is installed
19+
id: check-nix
20+
shell: bash
21+
run: |
22+
if [ -d "/nix/var/nix/profiles/default/bin" ]; then
23+
echo "installed=true" >> $GITHUB_OUTPUT
24+
else
25+
echo "installed=false" >> $GITHUB_OUTPUT
26+
fi
27+
28+
- name: Setup Git Credentials via gh CLI
29+
if: inputs.setup-git-auth == 'true' && steps.check-nix.outputs.installed == 'false'
30+
shell: bash
31+
run: gh auth setup-git
32+
33+
- name: Setup nix
34+
uses: ./.github/actions/setup-nix
35+
36+
- name: Setup rust cache
37+
uses: Swatinem/rust-cache@v2
38+
with:
39+
key: ${{ inputs.rust-cache-key }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-FileCopyrightText: 2025 Foundation Devices, Inc. <hello@foundation.xyz>
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
name: 'Setup Nix'
5+
inputs:
6+
use-cache:
7+
description: 'Enable magic nix cache'
8+
required: false
9+
default: 'true'
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Check if Nix is installed
15+
id: check-nix
16+
shell: bash
17+
run: |
18+
if [ -d "/nix/var/nix/profiles/default/bin" ]; then
19+
echo "installed=true" >> $GITHUB_OUTPUT
20+
else
21+
echo "installed=false" >> $GITHUB_OUTPUT
22+
fi
23+
24+
- name: Install Nix
25+
if: steps.check-nix.outputs.installed == 'false'
26+
uses: DeterminateSystems/determinate-nix-action@v3.11.1
27+
28+
- name: Setup existing Nix daemon
29+
if: steps.check-nix.outputs.installed == 'true'
30+
shell: bash
31+
run: |
32+
echo "PATH=/nix/var/nix/profiles/default/bin:$PATH" >> $GITHUB_ENV
33+
echo "Using existing Nix installation"
34+
35+
- name: Setup nix cache
36+
if: inputs.use-cache == 'true' && steps.check-nix.outputs.installed == 'false'
37+
uses: DeterminateSystems/magic-nix-cache-action@main

.github/workflows/check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# SPDX-FileCopyrightText: 2023 Foundation Devices, Inc. <hello@foundation.xyz>
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
name: Check
6+
on:
7+
workflow_call:
8+
env:
9+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
10+
jobs:
11+
check-atsama5d27:
12+
name: Check atsama5d27 compilation
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: ./.github/actions/setup-nix-rust
17+
18+
- run: nix develop .#build --command cargo check --target armv7a-none-eabi --package atsama5d27
19+
20+
check-workspace:
21+
name: Check workspace compilation
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: ./.github/actions/setup-nix-rust
26+
27+
- run: |
28+
nix develop .#build --command just check-workspace
29+
30+
check-recovery:
31+
name: Check recovery compilation
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: ./.github/actions/setup-nix-rust
36+
37+
- run: |
38+
nix develop .#build --command just check-recovery

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-FileCopyrightText: 2025 Foundation Devices, Inc. <hello@foundation.xyz>
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
name: CI
5+
on: [push]
6+
concurrency:
7+
group: ci-${{ github.ref || github.run_id }}
8+
cancel-in-progress: true
9+
env:
10+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
11+
12+
jobs:
13+
nix-cache:
14+
name: cache nix build shell
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 2
20+
- name: Check if nix files changed
21+
id: check
22+
run: |
23+
if git diff --name-only HEAD^ HEAD | grep -E '\.nix$|flake\.lock$'; then
24+
echo "Nix files changed, continuing with cache build"
25+
echo "changed=true" >> $GITHUB_OUTPUT
26+
else
27+
echo "No nix files changed, skipping cache build"
28+
echo "changed=false" >> $GITHUB_OUTPUT
29+
fi
30+
- name: Setup nix
31+
if: steps.check.outputs.changed == 'true'
32+
uses: DeterminateSystems/nix-installer-action@main
33+
- name: Setup nix cache
34+
if: steps.check.outputs.changed == 'true'
35+
uses: DeterminateSystems/magic-nix-cache-action@main
36+
- name: Build nix shell
37+
if: steps.check.outputs.changed == 'true'
38+
run: nix build .#devShells.x86_64-linux.build --no-link
39+
40+
# no-wait
41+
lint:
42+
uses: ./.github/workflows/lint.yml
43+
secrets: inherit
44+
45+
keyos-image-nix:
46+
uses: ./.github/workflows/keyos-image-nix.yml
47+
secrets: inherit
48+
49+
# wait
50+
check:
51+
needs: nix-cache
52+
uses: ./.github/workflows/check.yml
53+
secrets: inherit
54+
55+
dependencies:
56+
needs: nix-cache
57+
uses: ./.github/workflows/dependencies.yml
58+
secrets: inherit
59+
60+
hosted:
61+
needs: nix-cache
62+
uses: ./.github/workflows/hosted.yml
63+
secrets: inherit
64+

0 commit comments

Comments
 (0)