Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: [ nightly, beta, stable, 1.69.0 ]
toolchain: [ nightly, beta, stable ]
steps:
- uses: actions/checkout@v2
- name: Install rust ${{ matrix.toolchain }}
Expand All @@ -85,3 +85,20 @@ jobs:
with:
command: check
args: --workspace --all-targets --all-features

msrv-build:
name: "toolchains (msrv)"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v5
- name: Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build rgb-std
run: nix build
- name: Build rgb-invoice
run: nix build .#rgb-invoice
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
*.swp

/dep_test
result
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ homepage = "https://github.com/RGB-WG"
repository = "https://github.com/RGB-WG/rgb-std"
keywords = ["bitcoin", "lightning", "rgb", "smart-contracts", "lnp-bp"]
categories = ["cryptography::cryptocurrencies"]
rust-version = "1.69.0" # Due to TOML dependency in amplify crate
rust-version = "1.70.0"
edition = "2021"
license = "Apache-2.0"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ by default.

### MSRV

Minimum supported rust compiler version (MSRV): 1.66, rust 2021 edition.
Minimum supported rust compiler version (MSRV) is shown in `rust-version` of `Cargo.toml`.

## Contributing

Expand Down
106 changes: 106 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 57 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};

crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};

flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, crane, rust-overlay, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};

cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
rust = pkgs.rust-bin.stable."${cargoToml.workspace.package."rust-version"}".default;
craneLib = (crane.mkLib pkgs).overrideToolchain rust;
in
with pkgs;
{
devShell = mkShell {
buildInputs = [
openssl
pkg-config
rust
];
};
packages = rec {
default = rgb-std;
rgb-std = craneLib.buildPackage {
strictDeps = true;
src = ./.;
cargoExtraArgs = "-p rgb-std";
doCheck = false;
};
rgb-invoice = craneLib.buildPackage {
strictDeps = true;
src = ./.;
cargoExtraArgs = "-p rgb-invoice";
doCheck = false;
};
};
}
);
}