Skip to content

Commit 35ab1cc

Browse files
committed
chore: update CI, lock files and flake for no_std targets
1 parent 1ef5813 commit 35ab1cc

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/rust.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,21 @@ jobs:
145145
uses: Swatinem/rust-cache@v2
146146
- name: "Build fuzz targets"
147147
run: cd fuzz && cargo build
148+
149+
Embedded:
150+
name: Embedded build
151+
runs-on: ubuntu-latest
152+
steps:
153+
- name: "Checkout repo"
154+
uses: actions/checkout@v4
155+
- name: "Install nightly toolchain"
156+
uses: dtolnay/rust-toolchain@nightly
157+
with:
158+
components: rust-src
159+
targets: thumbv7em-none-eabihf
160+
- name: Install ARM cross compiler
161+
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi
162+
- name: "Build embedded target"
163+
env:
164+
CC_thumbv7em_none_eabihf: arm-none-eabi-gcc
165+
run: cargo build -p payjoin --no-default-features --features "alloc,v2" --target thumbv7em-none-eabihf -Zbuild-std=core,alloc

flake.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,24 @@
340340
AR_wasm32_unknown_unknown = "${pkgs.llvmPackages.bintools-unwrapped}/bin/llvm-ar";
341341
};
342342

343+
embeddedRustToolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override {
344+
extensions = [
345+
"rust-src"
346+
"rustfmt"
347+
"llvm-tools-preview"
348+
];
349+
targets = [ "thumbv7em-none-eabihf" ];
350+
};
351+
352+
embeddedDevShell = pkgs.mkShell {
353+
name = "embedded-dev";
354+
packages = with pkgs; [
355+
embeddedRustToolchain
356+
gcc-arm-embedded
357+
];
358+
CC_thumbv7em_none_eabihf = "arm-none-eabi-gcc";
359+
};
360+
343361
dartDevShell = pkgs.mkShell {
344362
name = "dart-dev";
345363
packages =
@@ -461,6 +479,7 @@
461479
javascript = javascriptDevShell;
462480
csharp = csharpDevShell;
463481
dart = dartDevShell;
482+
embedded = embeddedDevShell;
464483
};
465484
formatter = treefmtEval.config.build.wrapper;
466485
checks =

0 commit comments

Comments
 (0)