Skip to content

Commit 654d55c

Browse files
committed
chore: update CI, lock files and flake for no_std targets
1 parent 2e05c5c commit 654d55c

4 files changed

Lines changed: 39 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

Cargo-minimal.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,6 +2733,7 @@ dependencies = [
27332733
"bitcoin-ohttp",
27342734
"bitcoin-units",
27352735
"bitcoin_uri",
2736+
"getrandom 0.3.4",
27362737
"http",
27372738
"once_cell",
27382739
"payjoin-test-utils",

Cargo-recent.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,6 +2833,7 @@ dependencies = [
28332833
"bitcoin-ohttp",
28342834
"bitcoin-units",
28352835
"bitcoin_uri",
2836+
"getrandom 0.3.4",
28362837
"http",
28372838
"once_cell",
28382839
"payjoin-test-utils",

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)