Compare commits

..
Author SHA1 Message Date
155a2266dc Update Rust crate chacha20poly1305 to 0.11
Some checks failed
renovate/stability-days Updates have met minimum release age requirement
CI / checks (pull_request) Failing after 2m29s
2026-08-27 22:01:27 +03:00
3 changed files with 26 additions and 43 deletions

1
.envrc
View file

@ -1 +0,0 @@
use flake

1
.gitignore vendored
View file

@ -6,4 +6,3 @@ dist/
*.tgz *.tgz
wasm/pkg/ wasm/pkg/
web_client/ web_client/
.direnv

View file

@ -5,30 +5,26 @@
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
}; };
outputs = outputs = {
{
self, self,
nixpkgs, nixpkgs,
rust-overlay, rust-overlay,
}: }: let
let
systems = [ systems = [
"aarch64-darwin" "aarch64-darwin"
"aarch64-linux" "aarch64-linux"
"x86_64-darwin" "x86_64-darwin"
"x86_64-linux" "x86_64-linux"
]; ];
eachSystem = eachSystem = f:
f: nixpkgs.lib.foldl' nixpkgs.lib.recursiveUpdate {} (
nixpkgs.lib.foldl' nixpkgs.lib.recursiveUpdate { } ( map (system: nixpkgs.lib.mapAttrs (_: value: {${system} = value;}) (f system)) systems
map (system: nixpkgs.lib.mapAttrs (_: value: { ${system} = value; }) (f system)) systems
); );
in in
eachSystem ( eachSystem (
system: system: let
let overlays = [rust-overlay.overlays.default];
overlays = [ rust-overlay.overlays.default ]; pkgs = import nixpkgs {inherit system overlays;};
pkgs = import nixpkgs { inherit system overlays; };
rustToolchain = pkgs.rust-bin.stable.latest.default.override { rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [ extensions = [
@ -36,12 +32,12 @@
"clippy" "clippy"
"rustfmt" "rustfmt"
]; ];
targets = [ "wasm32-unknown-unknown" ]; targets = ["wasm32-unknown-unknown"];
}; };
clippyCheck = pkgs.writeShellApplication { clippyCheck = pkgs.writeShellApplication {
name = "mtp-clippy"; name = "mtp-clippy";
runtimeInputs = [ rustToolchain ]; runtimeInputs = [rustToolchain];
text = '' text = ''
export MTP_TYPE_MAPS="''${MTP_TYPE_MAPS:-$PWD/example/type-maps.yaml}" export MTP_TYPE_MAPS="''${MTP_TYPE_MAPS:-$PWD/example/type-maps.yaml}"
cargo clippy --workspace --exclude mtp-wasm --all-targets --all-features -- -D warnings -W unreachable-pub cargo clippy --workspace --exclude mtp-wasm --all-targets --all-features -- -D warnings -W unreachable-pub
@ -50,7 +46,7 @@
macheteCheck = pkgs.writeShellApplication { macheteCheck = pkgs.writeShellApplication {
name = "mtp-machete"; name = "mtp-machete";
runtimeInputs = [ pkgs.cargo-machete ]; runtimeInputs = [pkgs.cargo-machete];
text = '' text = ''
cargo machete "$@" cargo machete "$@"
''; '';
@ -58,15 +54,7 @@
buildAll = pkgs.writeShellApplication { buildAll = pkgs.writeShellApplication {
name = "mtp-build-all"; name = "mtp-build-all";
runtimeInputs = [ runtimeInputs = [rustToolchain pkgs.cargo-deny pkgs.wasm-pack pkgs.pnpm pkgs.coreutils clippyCheck macheteCheck];
rustToolchain
pkgs.cargo-deny
pkgs.wasm-pack
pkgs.pnpm
pkgs.coreutils
clippyCheck
macheteCheck
];
text = '' text = ''
export MTP_TYPE_MAPS="''${MTP_TYPE_MAPS:-$PWD/example/type-maps.yaml}" export MTP_TYPE_MAPS="''${MTP_TYPE_MAPS:-$PWD/example/type-maps.yaml}"
@ -78,6 +66,7 @@
cargo check --manifest-path example/Cargo.toml --workspace --all-targets --all-features cargo check --manifest-path example/Cargo.toml --workspace --all-targets --all-features
mtp-clippy mtp-clippy
mtp-machete mtp-machete
pnpm run dup
pnpm run build pnpm run build
RUSTFLAGS="--cfg web_sys_unstable_apis" wasm-pack test --node wasm RUSTFLAGS="--cfg web_sys_unstable_apis" wasm-pack test --node wasm
pnpm run test:e2e pnpm run test:e2e
@ -90,17 +79,13 @@
healthCheck = pkgs.writeShellApplication { healthCheck = pkgs.writeShellApplication {
name = "mtp-health"; name = "mtp-health";
runtimeInputs = [ runtimeInputs = [clippyCheck macheteCheck];
clippyCheck
macheteCheck
];
text = '' text = ''
mtp-clippy mtp-clippy
mtp-machete mtp-machete
''; '';
}; };
in in {
{
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
name = "mtp-dev"; name = "mtp-dev";