From 6f50501b0583d42186d81dc6a67395acbfa9d9b5 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Wed, 17 Aug 2022 20:42:40 -0700 Subject: [PATCH] plausibly have a build that will do better through CI than previously --- .github/workflows/ci.yml | 34 +- .prettierignore | 2 + flake.lock | 99 +- flake.nix | 74 +- nix/rust-toolchain.toml | 5 + nix/shell.nix | 4 +- nix/squiggle-components.nix | 15 +- nix/squiggle-lang.nix | 4 +- nix/squiggle-mc.nix | 80 +- nix/squiggle-website.nix | 16 +- packages/mc/Cargo.lock | 73 +- packages/mc/Cargo.nix | 1226 ------------------- packages/mc/Cargo.toml | 13 +- packages/mc/README.md | 51 +- packages/mc/cargo-refresh-nix.sh | 2 - packages/mc/src/distribution/monte_carlo.rs | 51 +- packages/mc/src/lib.rs | 23 +- packages/mc/static/index.html | 2 +- packages/mc/webpack.config.js | 2 +- 19 files changed, 188 insertions(+), 1588 deletions(-) create mode 100644 nix/rust-toolchain.toml delete mode 100644 packages/mc/Cargo.nix delete mode 100755 packages/mc/cargo-refresh-nix.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0da6aed..b56cd49b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,11 +69,11 @@ jobs: - name: Download wasm-bindgen uses: jetli/wasm-bindgen-action@v0.1.0 with: - version: 'latest' + version: "latest" - name: Download wasm-pack uses: jetli/wasm-pack-action@v0.3.0 with: - version: 'latest' + version: "latest" - name: Build run: wasm-pack build --target nodejs @@ -88,7 +88,7 @@ jobs: working-directory: packages/squiggle-lang steps: - uses: actions/checkout@v3 - - name: Install Dependencies + - name: Install dependencies run: cd ../../ && yarn - name: Check rescript lint run: yarn lint:rescript @@ -116,13 +116,13 @@ jobs: - name: Download wasm-bindgen uses: jetli/wasm-bindgen-action@v0.1.0 with: - version: 'latest' + version: "latest" - name: Download wasm-pack uses: jetli/wasm-pack-action@v0.3.0 with: - version: 'latest' - - name: Build - run: wasm-pack build --target nodejs + version: "latest" + - name: Build squiggle-mc + run: cd ../mc && wasm-pack build --target nodejs - name: Build rescript codebase and typescript interface run: yarn build - name: Run rescript tests @@ -169,13 +169,13 @@ jobs: - name: Download wasm-bindgen uses: jetli/wasm-bindgen-action@v0.1.0 with: - version: 'latest' + version: "latest" - name: Download wasm-pack uses: jetli/wasm-pack-action@v0.3.0 with: - version: 'latest' - - name: Build - run: wasm-pack build --target nodejs + version: "latest" + - name: Build squiggle-mc + run: cd ../mc wasm-pack build --target nodejs - name: Build rescript codebase and typescript interface in squiggle-lang run: cd ../squiggle-lang && yarn build - name: Run webpack @@ -216,13 +216,13 @@ jobs: - name: Download wasm-bindgen uses: jetli/wasm-bindgen-action@v0.1.0 with: - version: 'latest' + version: "latest" - name: Download wasm-pack uses: jetli/wasm-pack-action@v0.3.0 with: - version: 'latest' - - name: Build - run: wasm-pack build --target nodejs + version: "latest" + - name: Build squiggle-mc + run: cd ../mc wasm-pack build --target nodejs - name: Build rescript and typescript in squiggle-lang run: cd ../squiggle-lang && yarn build - name: Build components @@ -259,7 +259,9 @@ jobs: - uses: actions/checkout@v3 - name: Install dependencies from monorepo level run: cd ../../ && yarn - - name: Build + - name: Build squiggle-mc + run: cd ../mc && wasm-pack build --target nodejs + - name: Build vscode run: yarn compile cli-lint: diff --git a/.prettierignore b/.prettierignore index cdbdaa36..18cb3b19 100644 --- a/.prettierignore +++ b/.prettierignore @@ -14,3 +14,5 @@ packages/website/build/ packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js packages/vscode-ext/media/vendor/ packages/mc/pkg/ +packages/mc/target/ +result diff --git a/flake.lock b/flake.lock index 988f334a..27fd0160 100644 --- a/flake.lock +++ b/flake.lock @@ -1,52 +1,12 @@ { "nodes": { - "cargo2nix": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1655189312, - "narHash": "sha256-gpJ57OgIebUpO+7F00VltxSEy6dz2x6HeJ5BcRM8rDA=", - "owner": "cargo2nix", - "repo": "cargo2nix", - "rev": "c149357cc3d17f2849c73eb7a09d07a307cdcfe8", - "type": "github" - }, - "original": { - "owner": "cargo2nix", - "ref": "release-0.11.0", - "repo": "cargo2nix", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "type": "github" }, "original": { @@ -72,11 +32,11 @@ }, "flake-utils_3": { "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", "owner": "numtide", "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", "type": "github" }, "original": { @@ -87,7 +47,7 @@ }, "gentype": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -126,33 +86,13 @@ "type": "github" } }, - "naersk": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1659610603, - "narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=", - "owner": "nix-community", - "repo": "naersk", - "rev": "c6a45e4277fa58abd524681466d3450f896dc094", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1660496378, - "narHash": "sha256-sgAhmrC1iSnl5T2VPPiMpciH1aRw5c7PYEdXX6jd6Gk=", + "lastModified": 1660581366, + "narHash": "sha256-et+bi9/jlSF/pHx5AYB9ZP2XDdZEQ0vnF7xlvs4503Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "879121648fe522b38cc1cf75aef160a14a1f2e7b", + "rev": "3d47bbaa26e7a771059d828eecf3bd8bf28a8b0f", "type": "github" }, "original": { @@ -163,31 +103,26 @@ }, "root": { "inputs": { - "cargo2nix": "cargo2nix", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "gentype": "gentype", "hercules-ci-effects": "hercules-ci-effects", - "naersk": "naersk", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" } }, "rust-overlay": { "inputs": { - "flake-utils": [ - "cargo2nix", - "flake-utils" - ], + "flake-utils": "flake-utils_3", "nixpkgs": [ - "cargo2nix", "nixpkgs" ] }, "locked": { - "lastModified": 1653878966, - "narHash": "sha256-T51Gck/vrJZi1m+uTbhEFTRgZmE59sydVONadADv358=", + "lastModified": 1660704984, + "narHash": "sha256-9sMoNrKh0b5NOEwe1j6H4dTRAsBsq1fmyDCXHzjB3Nc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "8526d618af012a923ca116be9603e818b502a8db", + "rev": "2801b291b546dcdcebfa47043fe09f7a0da72880", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5021151e..7f12e710 100644 --- a/flake.nix +++ b/flake.nix @@ -3,12 +3,8 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-22.05"; - naersk = { - url = "github:nix-community/naersk"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - cargo2nix = { - url = "github:cargo2nix/cargo2nix/release-0.11.0"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; gentype = { @@ -25,20 +21,14 @@ }; }; - outputs = { self, nixpkgs, gentype, hercules-ci-effects, naersk, cargo2nix - , flake-utils, ... }: + outputs = { self, nixpkgs, rust-overlay, gentype, hercules-ci-effects, flake-utils, ... }: let version = builtins.substring 0 8 self.lastModifiedDate; - crossSystemForWasmPkgs = { - config = "wasm32-unknown-wasi-unknown"; - system = "wasm32-wasi"; - useLLVM = true; - }; overlays = [ - cargo2nix.overlays.default + rust-overlay.overlays.default (final: prev: { # set the node version here - nodejs = prev.nodejs-16_x; + nodejs = prev.nodejs-18_x; # The override is the only way to get it into mkYarnModules }) ]; @@ -48,17 +38,13 @@ prettier = with pkgs.nodePackages; [ prettier ]; which = [ pkgs.which ]; }; - naerskFn = { pkgs, rust, ... }: - pkgs.callPackage naersk { - cargo = rust; - rustc = rust; - }; gentypeOutputFn = pkgs: gentype.outputs.packages.${pkgs.system}.default; - mcFn = { pkgs, wasmPkgs, ... }: + mcFn = { pkgs, ... }: import ./nix/squiggle-mc.nix { - inherit pkgs wasmPkgs commonFn naerskFn; + inherit pkgs; }; langFn = { pkgs, ... }: + # Probably doesn't work on i686-linux import ./nix/squiggle-lang.nix { inherit pkgs commonFn mcFn gentypeOutputFn; }; @@ -72,17 +58,17 @@ }; # local machines - localFlake = { pkgs, wasmPkgs, ... }: + localFlake = { pkgs, ... }: let - mc = mcFn { inherit pkgs wasmPkgs; }; + mc = mcFn pkgs; lang = langFn pkgs; components = componentsFn pkgs; website = websiteFn pkgs; in { # validating checks = flake-utils.lib.flattenTree { - wasm-lint = mc.rust-lint; - wasm-headless-test = mc.firefox-test; + wasm-lint = mc.lint; + wasm-test = mc.test; lang-lint = lang.lint; lang-test = lang.test; components-lint = components.lint; @@ -90,20 +76,16 @@ }; # building packages = flake-utils.lib.flattenTree { - default = website.docusaurus; - mc-wasm = mc.lib; - mc-wasm2 = mc.lib2; - mc-wasm-pkg = mc.webpack-build-pkg; + default = components.package-build; + mc-wasm = mc.pkg; lang-bundle = lang.bundle; components = components.package-build; - storybook = components.site-build; - docs-site = website.docusaurus; }; # developing devShells = flake-utils.lib.flattenTree { default = - (import ./nix/shell.nix { inherit pkgs cargo2nix; }).shell; + (import ./nix/shell.nix { inherit pkgs; }).shell; }; }; @@ -111,16 +93,8 @@ herc = let hciSystem = "x86_64-linux"; hciPkgs = import nixpkgs { system = hciSystem; }; - hciPkgsWasm = import nixpkgs { - system = hciSystem; - crossSystem = crossSystemForWasmPkgs; - overlays = overlays; - }; effects = hercules-ci-effects.lib.withPkgs hciPkgs; - mc = mcFn { - pkgs = hciPkgs; - wasmPkgs = hciPkgsWasm; - }; + mc = mcFn hciPkgs; lang = langFn hciPkgs; components = componentsFn hciPkgs; website = websiteFn hciPkgs; @@ -129,9 +103,9 @@ ciSystems = [ hciSystem ]; onPush = { wasm.outputs = { - squiggle-wasm-lint = mc.rust-lint; - squiggle-wasm-pkg = mc.webpack-build-pkg; - squiggle-wasm-test-ff = mc.firefox-test; + squiggle-wasm-lint = mc.lint; + squiggle-wasm-pkg = mc.pkg; + squiggle-wasm-test = mc.test; }; lang.outputs = { squiggle-lang-lint = lang.lint; @@ -158,14 +132,6 @@ inherit system; overlays = overlays; }; - pkgsWasm = import nixpkgs { - inherit system; - overlays = overlays; - crossSystem = crossSystemForWasmPkgs; - }; - in localFlake { - pkgs = pkgs; - wasmPkgs = pkgsWasm; - }) // herc; + in localFlake pkgs) // herc; } diff --git a/nix/rust-toolchain.toml b/nix/rust-toolchain.toml new file mode 100644 index 00000000..e58edcb5 --- /dev/null +++ b/nix/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "stable" +components = [] +targets = [ "wasm32-unknown-unknown" ] +profile = "default" diff --git a/nix/shell.nix b/nix/shell.nix index 84d05b29..16c20eab 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -1,4 +1,4 @@ -{ pkgs, cargo2nix }: +{ pkgs }: with pkgs; { shell = mkShell { name = "SQUIGGLE_yarn-wasm-devshell"; @@ -13,9 +13,9 @@ with pkgs; { libressl nixfmt rustfmt - cargo2nix.outputs.packages.${pkgs.system}.default wasmtime binaryen + wasm-bindgen-cli ]; }; } diff --git a/nix/squiggle-components.nix b/nix/squiggle-components.nix index 566b7eb1..15f1e877 100644 --- a/nix/squiggle-components.nix +++ b/nix/squiggle-components.nix @@ -17,7 +17,7 @@ rec { src = ../packages/components; packageJSON = componentsPackageJson; yarnLock = ../yarn.lock; - packageResolutions."@quri/squiggle-mc" = mc.webpack-build-pkg; + packageResolutions."@quri/squiggle-mc" = mc.pkg; packageResolutions."@quri/squiggle-lang" = lang.build; }; lint = pkgs.stdenv.mkDerivation { @@ -52,17 +52,4 @@ rec { cp -r deps/@quri/squiggle-components/. $out ''; }; - site-build = pkgs.stdenv.mkDerivation { - name = "squiggle-components-storybook"; - src = package-build; - buildInputs = common.buildInputs; - buildPhase = "yarn build:storybook"; - installPhase = '' - mkdir -p $out - - # patching .gitignore so flake keeps build artefacts - sed -i /build/d .gitignore - sed -i /storybook-static/d .gitignore - ''; - }; } diff --git a/nix/squiggle-lang.nix b/nix/squiggle-lang.nix index 7ef96f3e..b8181c97 100644 --- a/nix/squiggle-lang.nix +++ b/nix/squiggle-lang.nix @@ -10,7 +10,7 @@ rec { yarnLock = ../yarn.lock; pkgConfig = { rescript = { - buildInputs = common.which ++ [ pkgs.gcc_multi ]; + buildInputs = common.which ++ (if pkgs.system != "i686-linux" then [ pkgs.gcc_multi ] else []); postInstall = '' echo "PATCHELF'ING RESCRIPT EXECUTABLES (INCL NINJA)" # Patching interpreter for linux/*.exe's @@ -39,7 +39,7 @@ rec { ''; }; }; - packageResolutions."@quri/squiggle-mc" = mc.webpack-build-pkg; + packageResolutions."@quri/squiggle-mc" = mc.pkg; }; lint = pkgs.stdenv.mkDerivation { name = "squiggle-lang-lint"; diff --git a/nix/squiggle-mc.nix b/nix/squiggle-mc.nix index 7e933a47..1db46975 100644 --- a/nix/squiggle-mc.nix +++ b/nix/squiggle-mc.nix @@ -1,65 +1,43 @@ -{ pkgs, wasmPkgs, commonFn, naerskFn }: +{ pkgs }: -rec { - common = commonFn pkgs; - - rustVersion = "1.61.0"; - wasmTarget = "wasm32-unknown-unknown"; - rust = pkgs.rust-bin.stable.${rustVersion}.default.override { - targets = [ wasmTarget ]; - }; - naersk = naerskFn { inherit pkgs rust; }; - mc-pkg = naersk.buildPackage { +with pkgs.rustPlatform; rec { + rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; + pkg = buildRustPackage { + pname = "quri_squiggle_mc"; + version = "0.0.1"; src = ../packages/mc; - copyLibs = true; - copyBins = true; - CARGO_BUILD_TARGET = wasmTarget; - nativeBuildInputs = common.buildInputs; - }; - lib2 = mc-pkg; - rustPkgsWasm = wasmPkgs.rustBuilder.makePackageSet { - rustVersion = rustVersion; - packageFun = import ../packages/mc/Cargo.nix; - target = wasmTarget; - }; - lib = (rustPkgsWasm.workspace.quri-squiggle-mc { }).out; + nativeBuildInputs = [ rust pkgs.wasm-bindgen-cli ]; - yarn-source = pkgs.mkYarnPackage { - name = "squiggle-mc_yarnsource"; - buildInputs = common.buildInputs; - src = ../packages/mc; - packageJSON = ../packages/mc/package.json; - yarnLock = ../yarn.lock; + buildPhase = '' + cargo build --lib --release --target=wasm32-unknown-unknown + + mkdir -p $out/pkg + + wasm-bindgen --target nodejs --out-dir $out/pkg target/wasm32-unknown-unknown/release/quri_squiggle_mc.wasm + ''; + installPhase = "echo 'skipping installPhase'"; + + cargoLock = { + lockFile = ../packages/mc/Cargo.lock; + outputHashes = { + "kernel_density-0.0.2" = "sha256-pHh5p/AS+uopmPSaXK9rKHlmqS26qggXvf1TeitS430="; + }; + }; }; - rust-lint = pkgs.stdenv.mkDerivation { + lint = pkgs.stdenv.mkDerivation { name = "squiggle-mc-lint"; - src = yarn-source + "/libexec/@quri/squiggle-mc/deps/@quri/squiggle-mc"; + src = ../packages/mc; buildInputs = with pkgs; [ rustfmt ]; buildPhase = "rustfmt --check src"; installPhase = "mkdir -p $out"; }; - webpack-build-pkg = pkgs.stdenv.mkDerivation { - name = "squiggle-mc-build"; - src = yarn-source + "/libexec/@quri/squiggle-mc"; - buildInputs = common.buildInputs ++ (with pkgs; [ wasm-pack ]); - buildPhase = '' - pushd deps/@quri/squiggle-mc - sed -i /pkg/d .gitignore - yarn --offline build - popd - ''; - installPhase = '' - mkdir -p $out - cp -r deps/@quri/squiggle-mc/. $out - ''; - }; - firefox-test = pkgs.stdenv.mkDerivation { + + test = pkgs.stdenv.mkDerivation { name = "squiggle-mc-test"; - src = yarn-source + "/libexec/@quri/squiggle-mc/deps/@quri/squiggle-mc"; - buildInputs = common.buildInputs - ++ (with pkgs; [ geckodriver cargo wasm-pack ]); - buildPhase = "yarn --offline test -- --firefox"; + src = mc-pkg + "/pkg"; + buildInputs = with pkgs; [ cargo ]; + buildPhase = "cargo test"; installPhase = "mkdir -p $out"; }; } diff --git a/nix/squiggle-website.nix b/nix/squiggle-website.nix index df2eec54..90a9ec6b 100644 --- a/nix/squiggle-website.nix +++ b/nix/squiggle-website.nix @@ -18,7 +18,7 @@ rec { src = ../packages/website; packageJSON = websitePackageJson; yarnLock = ../yarn.lock; - packageResolutions."@quri/squiggle-mc" = mc.webpack-build-pkg + "/pkg"; + packageResolutions."@quri/squiggle-mc" = mc.pkg; packageResolutions."@quri/squiggle-lang" = lang.build; packageResolutions."@quri/squiggle-components" = components.package-build; }; @@ -29,18 +29,4 @@ rec { buildPhase = "yarn --offline lint"; installPhase = "mkdir -p $out"; }; - docusaurus = pkgs.stdenv.mkDerivation { - name = "squiggle-website"; - buildInputs = common.buildInputs; - src = yarn-source + "/libexec/squiggle-website"; - buildPhase = '' - pushd deps/squiggle-website - yarn --offline build - popd - ''; - installPhase = '' - mkdir -p $out - cp -r $src/build $out - ''; - }; } diff --git a/packages/mc/Cargo.lock b/packages/mc/Cargo.lock index 08aec2e1..f4b83d8d 100644 --- a/packages/mc/Cargo.lock +++ b/packages/mc/Cargo.lock @@ -36,9 +36,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bumpalo" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" [[package]] name = "cached" @@ -277,9 +277,9 @@ checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" dependencies = [ "wasm-bindgen", ] @@ -305,12 +305,6 @@ version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" -[[package]] -name = "libm" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" - [[package]] name = "log" version = "0.4.17" @@ -332,16 +326,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", - "libm", -] - [[package]] name = "num_cpus" version = "1.13.1" @@ -447,8 +431,8 @@ dependencies = [ "quickcheck", "quickcheck_macros", "rand 0.8.5", - "rand_distr", "serde", + "serde-wasm-bindgen", "statistics", "wasm-bindgen", "wasm-bindgen-futures", @@ -525,16 +509,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "rdrand" version = "0.4.0" @@ -582,6 +556,17 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfc62771e7b829b517cb213419236475f434fb480eddd76112ae182d274434a" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_derive" version = "1.0.143" @@ -697,9 +682,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" dependencies = [ "cfg-if 1.0.0", "serde", @@ -709,13 +694,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" dependencies = [ "bumpalo", + "lazy_static", "log", - "once_cell", "proc-macro2 1.0.43", "quote 1.0.21", "syn", @@ -737,9 +722,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" dependencies = [ "quote 1.0.21", "wasm-bindgen-macro-support", @@ -747,9 +732,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" dependencies = [ "proc-macro2 1.0.43", "quote 1.0.21", @@ -760,9 +745,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" [[package]] name = "wasm-bindgen-test" @@ -791,9 +776,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/packages/mc/Cargo.nix b/packages/mc/Cargo.nix deleted file mode 100644 index 43f931e3..00000000 --- a/packages/mc/Cargo.nix +++ /dev/null @@ -1,1226 +0,0 @@ -# This file was @generated by cargo2nix 0.11.0. -# It is not intended to be manually edited. - -args@{ - release ? true, - rootFeatures ? [ - "quri_squiggle_mc/default" - ], - rustPackages, - buildRustPackages, - hostPlatform, - hostPlatformCpu ? null, - hostPlatformFeatures ? [], - target ? null, - codegenOpts ? null, - profileOpts ? null, - rustcLinkFlags ? null, - rustcBuildFlags ? null, - mkRustCrate, - rustLib, - lib, - workspaceSrc, -}: -let - workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc; -in let - inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile; - profilesByName = { - release = builtins.fromTOML "lto = true\n"; - }; - rootFeatures' = expandFeatures rootFeatures; - overridableMkRustCrate = f: - let - drvs = genDrvsByProfile profilesByName ({ profile, profileName }: mkRustCrate ({ inherit release profile hostPlatformCpu hostPlatformFeatures target profileOpts codegenOpts rustcLinkFlags rustcBuildFlags; } // (f profileName))); - in { compileMode ? null, profileName ? decideProfile compileMode release }: - let drv = drvs.${profileName}; in if compileMode == null then drv else drv.override { inherit compileMode; }; -in -{ - cargo2nixVersion = "0.11.0"; - workspace = { - quri_squiggle_mc = rustPackages.unknown.quri_squiggle_mc."0.0.1"; - }; - "registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.18" = overridableMkRustCrate (profileName: rec { - name = "aho-corasick"; - version = "0.7.18"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - dependencies = { - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" = overridableMkRustCrate (profileName: rec { - name = "async-trait"; - version = "0.1.57"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f"; }; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".async_once."0.2.6" = overridableMkRustCrate (profileName: rec { - name = "async_once"; - version = "0.2.6"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2ce4f10ea3abcd6617873bae9f91d1c5332b4a778bd9ce34d0cd517474c1de82"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" = overridableMkRustCrate (profileName: rec { - name = "autocfg"; - version = "1.1.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.10.0" = overridableMkRustCrate (profileName: rec { - name = "bumpalo"; - version = "3.10.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3"; }; - features = builtins.concatLists [ - [ "default" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".cached."0.38.0" = overridableMkRustCrate (profileName: rec { - name = "cached"; - version = "0.38.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "27e6092f8c7ba6e65a46f6f26d7d7997201d3a6f0e69ff5d2440b930d7c0513a"; }; - features = builtins.concatLists [ - [ "async" ] - [ "async-trait" ] - [ "async_once" ] - [ "cached_proc_macro" ] - [ "cached_proc_macro_types" ] - [ "default" ] - [ "futures" ] - [ "lazy_static" ] - [ "proc_macro" ] - [ "tokio" ] - [ "wasm" ] - ]; - dependencies = { - async_trait = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.57" { profileName = "__noProfile"; }; - async_once = rustPackages."registry+https://github.com/rust-lang/crates.io-index".async_once."0.2.6" { inherit profileName; }; - cached_proc_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cached_proc_macro."0.15.0" { profileName = "__noProfile"; }; - cached_proc_macro_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cached_proc_macro_types."0.1.0" { inherit profileName; }; - futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.23" { inherit profileName; }; - hashbrown = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" { inherit profileName; }; - instant = rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }; - lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.13.1" { inherit profileName; }; - thiserror = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.32" { inherit profileName; }; - tokio = rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.20.1" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".cached_proc_macro."0.15.0" = overridableMkRustCrate (profileName: rec { - name = "cached_proc_macro"; - version = "0.15.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "751f7f4e7a091545e7f6c65bacc404eaee7e87bfb1f9ece234a1caa173dc16f2"; }; - dependencies = { - cached_proc_macro_types = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cached_proc_macro_types."0.1.0" { inherit profileName; }; - darling = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling."0.13.4" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".cached_proc_macro_types."0.1.0" = overridableMkRustCrate (profileName: rec { - name = "cached_proc_macro_types"; - version = "0.1.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" = overridableMkRustCrate (profileName: rec { - name = "cfg-if"; - version = "0.1.10"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" = overridableMkRustCrate (profileName: rec { - name = "cfg-if"; - version = "1.0.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".console_error_panic_hook."0.1.7" = overridableMkRustCrate (profileName: rec { - name = "console_error_panic_hook"; - version = "0.1.7"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"; }; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".darling."0.13.4" = overridableMkRustCrate (profileName: rec { - name = "darling"; - version = "0.13.4"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"; }; - features = builtins.concatLists [ - [ "default" ] - [ "suggestions" ] - ]; - dependencies = { - darling_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.13.4" { inherit profileName; }; - darling_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_macro."0.13.4" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".darling_core."0.13.4" = overridableMkRustCrate (profileName: rec { - name = "darling_core"; - version = "0.13.4"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"; }; - features = builtins.concatLists [ - [ "strsim" ] - [ "suggestions" ] - ]; - dependencies = { - fnv = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }; - ident_case = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ident_case."1.0.1" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - strsim = rustPackages."registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".darling_macro."0.13.4" = overridableMkRustCrate (profileName: rec { - name = "darling_macro"; - version = "0.13.4"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"; }; - dependencies = { - darling_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.13.4" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".env_logger."0.8.4" = overridableMkRustCrate (profileName: rec { - name = "env_logger"; - version = "0.8.4"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"; }; - features = builtins.concatLists [ - [ "regex" ] - ]; - dependencies = { - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" = overridableMkRustCrate (profileName: rec { - name = "fnv"; - version = "1.0.7"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".fuchsia-cprng."0.1.1" = overridableMkRustCrate (profileName: rec { - name = "fuchsia-cprng"; - version = "0.1.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures."0.1.31" = overridableMkRustCrate (profileName: rec { - name = "futures"; - version = "0.1.31"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678"; }; - features = builtins.concatLists [ - [ "default" ] - [ "use_std" ] - [ "with-deprecated" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ab30e97ab6aacfe635fad58f22c2bb06c8b685f7421eb1e064a729e2a5f481fa"; }; - dependencies = { - futures_channel = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.23" { inherit profileName; }; - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.23" { inherit profileName; }; - futures_io = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.23" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.23" { inherit profileName; }; - futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.23" { inherit profileName; }; - futures_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.23" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures-channel"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2bfc52cbddcfd745bf1740338492bb0bd83d76c67b445f91c5fb29fae29ecaa1"; }; - features = builtins.concatLists [ - [ "futures-sink" ] - [ "sink" ] - ]; - dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.23" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.23" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures-core"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d2acedae88d38235936c3922476b10fced7b2b68136f5e3c03c2d5be348a1115"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures-io"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "93a66fc6d035a26a3ae255a6d2bca35eda63ae4c5512bef54449113f7a1228e5"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures-sink"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ca0bae1fe9752cf7fd9b0064c674ae63f97b37bc714d745cbde0afb7ec4e6765"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures-task"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "842fc63b931f4056a24d59de13fb1272134ce261816e063e634ad0c15cdc5306"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "futures-util"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f0828a5471e340229c11c77ca80017937ce3c58cb788a17e5f1c2d5c485a9577"; }; - features = builtins.concatLists [ - [ "futures-sink" ] - [ "sink" ] - ]; - dependencies = { - futures_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.23" { inherit profileName; }; - futures_sink = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.23" { inherit profileName; }; - futures_task = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.23" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - pin_utils = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" = overridableMkRustCrate (profileName: rec { - name = "getrandom"; - version = "0.2.7"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"; }; - features = builtins.concatLists [ - [ "js" ] - [ "js-sys" ] - [ "std" ] - [ "wasm-bindgen" ] - ]; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && hostPlatform.parsed.kernel.name == "unknown" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - ${ if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" { inherit profileName; }; - ${ if hostPlatform.parsed.cpu.name == "wasm32" && hostPlatform.parsed.kernel.name == "unknown" then "wasm_bindgen" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" = overridableMkRustCrate (profileName: rec { - name = "hashbrown"; - version = "0.12.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"; }; - features = builtins.concatLists [ - [ "inline-more" ] - [ "raw" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" = overridableMkRustCrate (profileName: rec { - name = "hermit-abi"; - version = "0.1.19"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"; }; - features = builtins.concatLists [ - [ "default" ] - ]; - dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".ident_case."1.0.1" = overridableMkRustCrate (profileName: rec { - name = "ident_case"; - version = "1.0.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" = overridableMkRustCrate (profileName: rec { - name = "instant"; - version = "0.1.12"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"; }; - features = builtins.concatLists [ - [ "js-sys" ] - [ "wasm-bindgen" ] - [ "wasm-bindgen_rs" ] - [ "web-sys" ] - ]; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - ${ if hostPlatform.config == "asmjs-unknown-emscripten" || hostPlatform.config == "wasm32-unknown-emscripten" || hostPlatform.config == "wasm32-unknown-unknown" then "js_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - ${ if hostPlatform.config == "asmjs-unknown-emscripten" || hostPlatform.config == "wasm32-unknown-emscripten" || hostPlatform.config == "wasm32-unknown-unknown" then "wasm_bindgen_rs" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if hostPlatform.config == "asmjs-unknown-emscripten" || hostPlatform.config == "wasm32-unknown-emscripten" || hostPlatform.config == "wasm32-unknown-unknown" then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" = overridableMkRustCrate (profileName: rec { - name = "itoa"; - version = "1.0.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" = overridableMkRustCrate (profileName: rec { - name = "js-sys"; - version = "0.3.59"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"; }; - dependencies = { - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - }; - }); - - "git+https://github.com/daithiocrualaoich/kernel_density".kernel_density."0.0.2" = overridableMkRustCrate (profileName: rec { - name = "kernel_density"; - version = "0.0.2"; - registry = "git+https://github.com/daithiocrualaoich/kernel_density"; - src = fetchCrateGit { - url = https://github.com/daithiocrualaoich/kernel_density; - name = "kernel_density"; - version = "0.0.2"; - rev = "98c5fb6f9989d9bb6db19adc134cdbd32512d41e";}; - dependencies = { - rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.3.23" { inherit profileName; }; - special_fun = rustPackages."registry+https://github.com/rust-lang/crates.io-index".special-fun."0.1.6" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" = overridableMkRustCrate (profileName: rec { - name = "lazy_static"; - version = "1.4.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" = overridableMkRustCrate (profileName: rec { - name = "libc"; - version = "0.2.132"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".libm."0.2.5" = overridableMkRustCrate (profileName: rec { - name = "libm"; - version = "0.2.5"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565"; }; - features = builtins.concatLists [ - [ "default" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" = overridableMkRustCrate (profileName: rec { - name = "log"; - version = "0.4.17"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"; }; - features = builtins.concatLists [ - [ "std" ] - ]; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" = overridableMkRustCrate (profileName: rec { - name = "memchr"; - version = "2.5.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".memory_units."0.4.0" = overridableMkRustCrate (profileName: rec { - name = "memory_units"; - version = "0.4.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" = overridableMkRustCrate (profileName: rec { - name = "num-traits"; - version = "0.2.15"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"; }; - features = builtins.concatLists [ - [ "libm" ] - ]; - dependencies = { - libm = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libm."0.2.5" { inherit profileName; }; - }; - buildDependencies = { - autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.13.1" = overridableMkRustCrate (profileName: rec { - name = "num_cpus"; - version = "1.13.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"; }; - dependencies = { - ${ if (hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "aarch64") && hostPlatform.parsed.kernel.name == "hermit" then "hermit_abi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.1.19" { inherit profileName; }; - ${ if !hostPlatform.isWindows then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".once_cell."1.13.1" = overridableMkRustCrate (profileName: rec { - name = "once_cell"; - version = "1.13.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"; }; - features = builtins.concatLists [ - [ "alloc" ] - [ "default" ] - [ "race" ] - [ "std" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" = overridableMkRustCrate (profileName: rec { - name = "pin-project-lite"; - version = "0.2.9"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" = overridableMkRustCrate (profileName: rec { - name = "pin-utils"; - version = "0.1.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.16" = overridableMkRustCrate (profileName: rec { - name = "ppv-lite86"; - version = "0.2.16"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"; }; - features = builtins.concatLists [ - [ "simd" ] - [ "std" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."0.4.30" = overridableMkRustCrate (profileName: rec { - name = "proc-macro2"; - version = "0.4.30"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"; }; - features = builtins.concatLists [ - [ "default" ] - [ "proc-macro" ] - ]; - dependencies = { - unicode_xid = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-xid."0.1.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" = overridableMkRustCrate (profileName: rec { - name = "proc-macro2"; - version = "1.0.43"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"; }; - features = builtins.concatLists [ - [ "default" ] - [ "proc-macro" ] - ]; - dependencies = { - unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.3" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".quickcheck."1.0.3" = overridableMkRustCrate (profileName: rec { - name = "quickcheck"; - version = "1.0.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"; }; - features = builtins.concatLists [ - [ "default" ] - [ "env_logger" ] - [ "log" ] - [ "regex" ] - [ "use_logging" ] - ]; - dependencies = { - env_logger = rustPackages."registry+https://github.com/rust-lang/crates.io-index".env_logger."0.8.4" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".quickcheck_macros."1.0.0" = overridableMkRustCrate (profileName: rec { - name = "quickcheck_macros"; - version = "1.0.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b22a693222d716a9587786f37ac3f6b4faedb5b80c23914e7303ff5a1d8016e9"; }; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".quote."0.6.13" = overridableMkRustCrate (profileName: rec { - name = "quote"; - version = "0.6.13"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"; }; - features = builtins.concatLists [ - [ "default" ] - [ "proc-macro" ] - ]; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."0.4.30" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" = overridableMkRustCrate (profileName: rec { - name = "quote"; - version = "1.0.21"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"; }; - features = builtins.concatLists [ - [ "default" ] - [ "proc-macro" ] - ]; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - }; - }); - - "unknown".quri_squiggle_mc."0.0.1" = overridableMkRustCrate (profileName: rec { - name = "quri_squiggle_mc"; - version = "0.0.1"; - registry = "unknown"; - src = fetchCrateLocal workspaceSrc; - features = builtins.concatLists [ - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default") "default") - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") "wee_alloc") - ]; - dependencies = { - cached = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cached."0.38.0" { inherit profileName; }; - ${ if false then "console_error_panic_hook" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".console_error_panic_hook."0.1.7" { inherit profileName; }; - getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; - kernel_density = rustPackages."git+https://github.com/daithiocrualaoich/kernel_density".kernel_density."0.0.2" { inherit profileName; }; - rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - rand_distr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_distr."0.4.3" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.143" { inherit profileName; }; - statistics = rustPackages."registry+https://github.com/rust-lang/crates.io-index".statistics."0.4.1" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - web_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; - ${ if rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc" then "wee_alloc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wee_alloc."0.4.5" { inherit profileName; }; - }; - devDependencies = { - futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.1.31" { inherit profileName; }; - js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - quickcheck = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quickcheck."1.0.3" { inherit profileName; }; - quickcheck_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".quickcheck_macros."1.0.0" { profileName = "__noProfile"; }; - wasm_bindgen_futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.3.27" { inherit profileName; }; - wasm_bindgen_test = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-test."0.2.50" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand."0.3.23" = overridableMkRustCrate (profileName: rec { - name = "rand"; - version = "0.3.23"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c"; }; - dependencies = { - libc = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.4.6" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand."0.4.6" = overridableMkRustCrate (profileName: rec { - name = "rand"; - version = "0.4.6"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"; }; - features = builtins.concatLists [ - [ "default" ] - [ "libc" ] - [ "std" ] - ]; - dependencies = { - ${ if hostPlatform.parsed.kernel.name == "fuchsia" then "fuchsia_cprng" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".fuchsia-cprng."0.1.1" { inherit profileName; }; - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - ${ if hostPlatform.parsed.abi.name == "sgx" then "rand_core" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.3.1" { inherit profileName; }; - ${ if hostPlatform.parsed.abi.name == "sgx" then "rdrand" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rdrand."0.4.0" { inherit profileName; }; - ${ if hostPlatform.isWindows then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" = overridableMkRustCrate (profileName: rec { - name = "rand"; - version = "0.8.5"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"; }; - features = builtins.concatLists [ - [ "alloc" ] - [ "default" ] - [ "getrandom" ] - [ "libc" ] - [ "rand_chacha" ] - [ "small_rng" ] - [ "std" ] - [ "std_rng" ] - ]; - dependencies = { - ${ if hostPlatform.isUnix then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - rand_chacha = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_chacha."0.3.1" { inherit profileName; }; - rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.3" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand_chacha."0.3.1" = overridableMkRustCrate (profileName: rec { - name = "rand_chacha"; - version = "0.3.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"; }; - features = builtins.concatLists [ - [ "std" ] - ]; - dependencies = { - ppv_lite86 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.16" { inherit profileName; }; - rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.3" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand_core."0.3.1" = overridableMkRustCrate (profileName: rec { - name = "rand_core"; - version = "0.3.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"; }; - dependencies = { - rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.4.2" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand_core."0.4.2" = overridableMkRustCrate (profileName: rec { - name = "rand_core"; - version = "0.4.2"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.3" = overridableMkRustCrate (profileName: rec { - name = "rand_core"; - version = "0.6.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"; }; - features = builtins.concatLists [ - [ "alloc" ] - [ "getrandom" ] - [ "std" ] - ]; - dependencies = { - getrandom = rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.7" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rand_distr."0.4.3" = overridableMkRustCrate (profileName: rec { - name = "rand_distr"; - version = "0.4.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"; }; - features = builtins.concatLists [ - [ "alloc" ] - [ "default" ] - [ "std" ] - ]; - dependencies = { - num_traits = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.15" { inherit profileName; }; - rand = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".rdrand."0.4.0" = overridableMkRustCrate (profileName: rec { - name = "rdrand"; - version = "0.4.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - dependencies = { - rand_core = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.3.1" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".regex."1.6.0" = overridableMkRustCrate (profileName: rec { - name = "regex"; - version = "1.6.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"; }; - features = builtins.concatLists [ - [ "aho-corasick" ] - [ "memchr" ] - [ "perf" ] - [ "perf-cache" ] - [ "perf-dfa" ] - [ "perf-inline" ] - [ "perf-literal" ] - [ "std" ] - ]; - dependencies = { - aho_corasick = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.18" { inherit profileName; }; - memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.5.0" { inherit profileName; }; - regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.27" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.27" = overridableMkRustCrate (profileName: rec { - name = "regex-syntax"; - version = "0.6.27"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" = overridableMkRustCrate (profileName: rec { - name = "ryu"; - version = "1.0.11"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".scoped-tls."1.0.0" = overridableMkRustCrate (profileName: rec { - name = "scoped-tls"; - version = "1.0.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".serde."1.0.143" = overridableMkRustCrate (profileName: rec { - name = "serde"; - version = "1.0.143"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553"; }; - features = builtins.concatLists [ - [ "default" ] - [ "derive" ] - [ "serde_derive" ] - [ "std" ] - ]; - dependencies = { - serde_derive = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.143" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.143" = overridableMkRustCrate (profileName: rec { - name = "serde_derive"; - version = "1.0.143"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391"; }; - features = builtins.concatLists [ - [ "default" ] - ]; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.83" = overridableMkRustCrate (profileName: rec { - name = "serde_json"; - version = "1.0.83"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - dependencies = { - itoa = rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.3" { inherit profileName; }; - ryu = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.11" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.143" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".special-fun."0.1.6" = overridableMkRustCrate (profileName: rec { - name = "special-fun"; - version = "0.1.6"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5cde43d93062bf8040a0d30f83a8b40b2756af55ba048e007ee7c81e02276b81"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".statistics."0.4.1" = overridableMkRustCrate (profileName: rec { - name = "statistics"; - version = "0.4.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "3f4628c807954468b720f27d8863a5447d328378cbb874d633f6c4e952073acf"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" = overridableMkRustCrate (profileName: rec { - name = "strsim"; - version = "0.10.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" = overridableMkRustCrate (profileName: rec { - name = "syn"; - version = "1.0.99"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"; }; - features = builtins.concatLists [ - [ "clone-impls" ] - [ "default" ] - [ "derive" ] - [ "extra-traits" ] - [ "full" ] - [ "parsing" ] - [ "printing" ] - [ "proc-macro" ] - [ "quote" ] - [ "visit" ] - [ "visit-mut" ] - ]; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - unicode_ident = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.3" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.32" = overridableMkRustCrate (profileName: rec { - name = "thiserror"; - version = "1.0.32"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994"; }; - dependencies = { - thiserror_impl = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.32" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.32" = overridableMkRustCrate (profileName: rec { - name = "thiserror-impl"; - version = "1.0.32"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21"; }; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".tokio."1.20.1" = overridableMkRustCrate (profileName: rec { - name = "tokio"; - version = "1.20.1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581"; }; - features = builtins.concatLists [ - [ "default" ] - [ "macros" ] - [ "num_cpus" ] - [ "once_cell" ] - [ "rt" ] - [ "rt-multi-thread" ] - [ "sync" ] - [ "time" ] - [ "tokio-macros" ] - ]; - dependencies = { - num_cpus = rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.13.1" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.13.1" { inherit profileName; }; - pin_project_lite = rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.9" { inherit profileName; }; - tokio_macros = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-macros."1.8.0" { profileName = "__noProfile"; }; - }; - buildDependencies = { - autocfg = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".tokio-macros."1.8.0" = overridableMkRustCrate (profileName: rec { - name = "tokio-macros"; - version = "1.8.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484"; }; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.3" = overridableMkRustCrate (profileName: rec { - name = "unicode-ident"; - version = "1.0.3"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".unicode-xid."0.1.0" = overridableMkRustCrate (profileName: rec { - name = "unicode-xid"; - version = "0.1.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"; }; - features = builtins.concatLists [ - [ "default" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" = overridableMkRustCrate (profileName: rec { - name = "wasi"; - version = "0.11.0+wasi-snapshot-preview1"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"; }; - features = builtins.concatLists [ - [ "default" ] - [ "std" ] - ]; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen"; - version = "0.2.82"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"; }; - features = builtins.concatLists [ - [ "default" ] - [ "serde" ] - [ "serde-serialize" ] - [ "serde_json" ] - [ "spans" ] - [ "std" ] - ]; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }; - serde = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.143" { inherit profileName; }; - serde_json = rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.83" { inherit profileName; }; - wasm_bindgen_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.82" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.82" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-backend"; - version = "0.2.82"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"; }; - features = builtins.concatLists [ - [ "spans" ] - ]; - dependencies = { - bumpalo = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.10.0" { inherit profileName; }; - log = rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.17" { inherit profileName; }; - once_cell = rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.13.1" { inherit profileName; }; - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - wasm_bindgen_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.82" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.3.27" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-futures"; - version = "0.3.27"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c"; }; - dependencies = { - cfg_if = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; }; - futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.1.31" { inherit profileName; }; - js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - ${ if builtins.elem "atomics" hostPlatformFeatures then "web_sys" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.82" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-macro"; - version = "0.2.82"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"; }; - features = builtins.concatLists [ - [ "spans" ] - ]; - dependencies = { - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - wasm_bindgen_macro_support = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.82" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.82" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-macro-support"; - version = "0.2.82"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"; }; - features = builtins.concatLists [ - [ "spans" ] - ]; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.43" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.21" { inherit profileName; }; - syn = rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.99" { inherit profileName; }; - wasm_bindgen_backend = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.82" { inherit profileName; }; - wasm_bindgen_shared = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.82" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.82" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-shared"; - version = "0.2.82"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-test."0.2.50" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-test"; - version = "0.2.50"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "a2d9693b63a742d481c7f80587e057920e568317b2806988c59cd71618bc26c1"; }; - dependencies = { - console_error_panic_hook = rustPackages."registry+https://github.com/rust-lang/crates.io-index".console_error_panic_hook."0.1.7" { inherit profileName; }; - futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.1.31" { inherit profileName; }; - js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - scoped_tls = rustPackages."registry+https://github.com/rust-lang/crates.io-index".scoped-tls."1.0.0" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - wasm_bindgen_futures = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.3.27" { inherit profileName; }; - wasm_bindgen_test_macro = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-test-macro."0.2.50" { profileName = "__noProfile"; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-test-macro."0.2.50" = overridableMkRustCrate (profileName: rec { - name = "wasm-bindgen-test-macro"; - version = "0.2.50"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "0789dac148a8840bbcf9efe13905463b733fa96543bfbf263790535c11af7ba5"; }; - dependencies = { - proc_macro2 = rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."0.4.30" { inherit profileName; }; - quote = rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."0.6.13" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.59" = overridableMkRustCrate (profileName: rec { - name = "web-sys"; - version = "0.3.59"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"; }; - features = builtins.concatLists [ - [ "Event" ] - [ "EventTarget" ] - [ "MessageEvent" ] - [ "Performance" ] - [ "PerformanceTiming" ] - [ "Window" ] - [ "Worker" ] - [ "console" ] - ]; - dependencies = { - js_sys = rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.59" { inherit profileName; }; - wasm_bindgen = rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.82" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".wee_alloc."0.4.5" = overridableMkRustCrate (profileName: rec { - name = "wee_alloc"; - version = "0.4.5"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e"; }; - features = builtins.concatLists [ - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") "default") - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") "size_classes") - ]; - dependencies = { - ${ if rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc" then "cfg_if" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."0.1.10" { inherit profileName; }; - ${ if (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") && hostPlatform.isUnix && !(hostPlatform.parsed.cpu.name == "wasm32") then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.132" { inherit profileName; }; - ${ if rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc" then "memory_units" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memory_units."0.4.0" { inherit profileName; }; - ${ if (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") && hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" = overridableMkRustCrate (profileName: rec { - name = "winapi"; - version = "0.3.9"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"; }; - features = builtins.concatLists [ - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") "memoryapi") - [ "minwindef" ] - [ "ntsecapi" ] - [ "profileapi" ] - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") "synchapi") - (lib.optional (rootFeatures' ? "quri_squiggle_mc/default" || rootFeatures' ? "quri_squiggle_mc/wee_alloc") "winbase") - [ "winnt" ] - ]; - dependencies = { - ${ if hostPlatform.config == "i686-pc-windows-gnu" then "winapi_i686_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" { inherit profileName; }; - ${ if hostPlatform.config == "x86_64-pc-windows-gnu" then "winapi_x86_64_pc_windows_gnu" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" { inherit profileName; }; - }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { - name = "winapi-i686-pc-windows-gnu"; - version = "0.4.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"; }; - }); - - "registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { - name = "winapi-x86_64-pc-windows-gnu"; - version = "0.4.0"; - registry = "registry+https://github.com/rust-lang/crates.io-index"; - src = fetchCratesIo { inherit name version; sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"; }; - }); - -} diff --git a/packages/mc/Cargo.toml b/packages/mc/Cargo.toml index 253cf3aa..325f1307 100644 --- a/packages/mc/Cargo.toml +++ b/packages/mc/Cargo.toml @@ -33,13 +33,15 @@ default = ["wee_alloc"] [dependencies] # The `wasm-bindgen` crate provides the bare minimum functionality needed # to interact with JavaScript. -wasm-bindgen = { version = "0.2.82", features = ["serde-serialize"] } +wasm-bindgen = { version = "=0.2.79", features = ["serde-serialize"] } serde = { version = "1", features = ["derive"] } +serde-wasm-bindgen = "0.4.3" # The `web-sys` crate allows you to interact with the various browser APIs, # like the DOM. -web-sys = { version = "0.3.59", features = ["console"] } +web-sys = { version = "0.3", features = ["console"] } +js-sys = "0.3.22" # `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size # compared to the default allocator's ~10K. However, it is slower than the default # allocator, so it's not enabled by default. @@ -47,12 +49,12 @@ wee_alloc = { version = "0.4.2", optional = true } # Numerical things rand = "0.8.5" -getrandom = { version = "0.2", features = ["js"] } -rand_distr = "0.4.3" +getrandom = { version = "0.2.7", features = ["js"] } +# rand_distr = "0.4.3" statistics = "0.4.1" kernel_density = { git = "https://github.com/daithiocrualaoich/kernel_density" } cached = { version = "0.38.0", features = ["wasm"] } - +# instant = { git = "https://github.com/sebcrozet/instant", features = ["wasm-bindgen"] } # The `console_error_panic_hook` crate provides better debugging of panics by # logging them with `console.error`. This is great for development, but requires # all the `std::fmt` and `std::panicking` infrastructure, so it's only enabled @@ -64,7 +66,6 @@ console_error_panic_hook = "0.1.5" [dev-dependencies] wasm-bindgen-test = "0.2.45" futures = "0.1.27" -js-sys = "0.3.22" wasm-bindgen-futures = "0.3.22" quickcheck = "1" quickcheck_macros = "1" diff --git a/packages/mc/README.md b/packages/mc/README.md index 171f5efa..8008150b 100644 --- a/packages/mc/README.md +++ b/packages/mc/README.md @@ -1,54 +1,17 @@ -# `@quri/squiggle-mc` - parallel Monte Carlo with memoization for the `@quri/squiggle-lang` javascript interface +# `@quri/squiggle-mc` - (hope to be) parallel Monte Carlo with memoization for the `@quri/squiggle-lang` javascript interface ## How to install -Please run `yarn` at the monorepo level. +Please run `yarn` at the monorepo level. -In this subrepo, please run `./cargo-refresh-nix.sh` every time `Cargo.toml`/`Cargo.lock` is modified, it requires nix with flakes. +Please view `/.github/workflows/ci.yml` for the most accurate story about how to build in concert with the rest of the packages in the monorepo. -Please view `/.github/workflows/ci.yml` for the most accurate story about how to build in concert with the rest of the packages in the monorepo. +`nix develop` will set you up quite well. Rust versions for `wasm-pack` and so on could be a pain. -## How to run in debug mode +The build you need for the `squiggle-lang` package: ```sh -# Builds the project and opens it in a new browser tab. Auto-reloads when the project changes. -yarn start +wasm-pack build --target nodejs ``` -## How to build in release mode - -```sh -# Builds the project and places it into the `dist` folder. -yarn build -``` - -## How to run unit tests - -These are the headless browser tests, which will attempt to download and install drivers, and may fail. - -```sh -# Runs tests in Firefox -yarn test -- --firefox - -# Runs tests in Chrome -yarn test -- --chrome - -# Runs tests in Safari -yarn test -- --safari -``` - -## What does each file do? - -* `Cargo.toml` contains the standard Rust metadata. You put your Rust dependencies in here. You must change this file with your details (name, description, version, authors, categories) - -* `package.json` contains the standard npm metadata. You put your JavaScript dependencies in here. You must change this file with your details (author, name, version) - -* `webpack.config.js` contains the Webpack configuration. You shouldn't need to change this, unless you have very special needs. - -* The `js` folder contains your JavaScript code (`index.js` is used to hook everything into Webpack, you don't need to change it). - -* The `src` folder contains your Rust code. - -* The `static` folder contains any files that you want copied as-is into the final build. It contains an `index.html` file which loads the `index.js` file. - -* The `tests` folder contains your Rust unit tests. +the `webpack`/`package.json`/`static` is not active and will be deleted at some point. diff --git a/packages/mc/cargo-refresh-nix.sh b/packages/mc/cargo-refresh-nix.sh deleted file mode 100755 index 0437d6b6..00000000 --- a/packages/mc/cargo-refresh-nix.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -nix run github:cargo2nix/cargo2nix diff --git a/packages/mc/src/distribution/monte_carlo.rs b/packages/mc/src/distribution/monte_carlo.rs index ef625fe9..92d60535 100644 --- a/packages/mc/src/distribution/monte_carlo.rs +++ b/packages/mc/src/distribution/monte_carlo.rs @@ -1,34 +1,51 @@ use wasm_bindgen::prelude::*; +use js_sys::Float64Array; use rand::Rng; use rand::thread_rng; use kernel_density::kde; -use serde::Serialize; -use crate::distribution::bandwidth::{nrd0, nrd}; +use serde::{Serialize, Deserialize}; +// use crate::distribution::bandwidth::{nrd0, nrd}; // TODO: impl a constructor such that xs.len() == ys.len(). #[wasm_bindgen] -#[derive(Serialize)] +#[derive(Serialize, Deserialize)] pub struct PdfCurve { xs: Vec, ys: Vec, } -pub fn samples_to_continuous_pdf(samples: Vec, bandwidth: f64) -> JsValue { - let samples_to_map = samples.clone(); - let pdf = kde::normal(&samples, bandwidth); - let pdf_curve = PdfCurve { - xs: samples, - ys: samples_to_map.iter().map(|x| pdf.density(*x)).collect(), - }; - JsValue::from_serde::(&pdf_curve).unwrap() +#[wasm_bindgen] +impl PdfCurve { + #[wasm_bindgen(constructor)] + pub fn new(xs: Vec, ys: Vec) -> Result { + let mut sorted_zip: Vec<(&f64, &f64)> = xs.iter().zip(ys.iter()).collect(); + sorted_zip.sort_by(|a, b| a.0.partial_cmp(b.0).unwrap()); // Will panic if there are any NaN. + return match xs.len() != ys.len() { + true => return Err("error: xs and ys are not the same length".to_string()), + false => { + let xs: Vec = sorted_zip.iter().map(|a| *a.0).collect(); + let ys: Vec = sorted_zip.iter().map(|b| *b.1).collect(); + Ok(PdfCurve { xs: xs, ys: ys }) + }, + } + } + + #[wasm_bindgen(getter)] + pub fn xs(&self) -> Float64Array { + Float64Array::from(&self.xs[..]) + } + #[wasm_bindgen(getter)] + pub fn ys(&self) -> Float64Array { + Float64Array::from(&self.ys[..]) + } } -// pub fn get_curve(samples: Vec, n: u64) -> Vec { -// let bandwidth = nrd(&samples); -// let curve = samples_to_continuous_pdf(samples, bandwidth); -// return curve.ys; -// } - +pub fn samples_to_continuous_pdf(samples: Vec, bandwidth: f64) -> PdfCurve { + let samples_to_map = samples.clone(); + let pdf = kde::normal(&samples, bandwidth); + let pdf_curve = PdfCurve::new(samples, samples_to_map.iter().map(|x| pdf.density(*x)).collect()); + pdf_curve.unwrap() +} pub fn sample_n(xs: Vec, n: i32) -> Vec { let m = xs.len(); diff --git a/packages/mc/src/lib.rs b/packages/mc/src/lib.rs index 201a2559..47e961fe 100644 --- a/packages/mc/src/lib.rs +++ b/packages/mc/src/lib.rs @@ -1,7 +1,7 @@ use wasm_bindgen::prelude::*; -use web_sys::console; +use serde_wasm_bindgen; mod distribution; -use distribution::{monte_carlo, bandwidth}; +use distribution::monte_carlo; // When the `wee_alloc` feature is enabled, this uses `wee_alloc` as the global // allocator. @@ -17,14 +17,15 @@ pub fn sample_n(samples: Box<[f32]>, num_samples: i32) -> Vec { console_error_panic_hook::set_once(); let samples_vec = Vec::from(samples); - return monte_carlo::sample_n(samples_vec, num_samples); + monte_carlo::sample_n(samples_vec, num_samples) } -#[wasm_bindgen] -pub fn samples_to_continuous_pdf(samples: Box<[f64]>, bandwidth: f64) -> JsValue { - #[cfg(debug_assertions)] - console_error_panic_hook::set_once(); - - let samples_vec = Vec::from(samples); - monte_carlo::samples_to_continuous_pdf(samples_vec, bandwidth) -} +// #[wasm_bindgen] +// pub fn samples_to_continuous_pdf(samples: Box<[f64]>, bandwidth: f64) -> JsValue { +// #[cfg(debug_assertions)] +// console_error_panic_hook::set_once(); +// +// let samples_vec = Vec::from(samples); +// let pdf = monte_carlo::samples_to_continuous_pdf(samples_vec, bandwidth); +// serde_wasm_bindgen::to_value(&pdf).unwrap() +//} diff --git a/packages/mc/static/index.html b/packages/mc/static/index.html index 2a4fb04d..30dc8009 100644 --- a/packages/mc/static/index.html +++ b/packages/mc/static/index.html @@ -1,7 +1,7 @@ - + For developing squiggle-mc diff --git a/packages/mc/webpack.config.js b/packages/mc/webpack.config.js index b8bb656f..9ef6c758 100644 --- a/packages/mc/webpack.config.js +++ b/packages/mc/webpack.config.js @@ -27,7 +27,7 @@ module.exports = { }), ], resolve: { - extensions: [".tsx", ".ts", ".js"] + extensions: [".tsx", ".ts", ".js"], }, experiments: { asyncWebAssembly: true,