diff --git a/.gitignore b/.gitignore index 73911c2..42dda40 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *~ Cargo.Bazel.lock bazel-* +rust-project.json diff --git a/WORKSPACE b/WORKSPACE index 05c1619..2db7c86 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,20 +2,17 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # To find additional information on this release or newer ones visit: # https://github.com/bazelbuild/rules_rust/releases +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_rust", - sha256 = "950a3ad4166ae60c8ccd628d1a8e64396106e7f98361ebe91b0bcfe60d8e4b60", - urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.20.0/rules_rust-v0.20.0.tar.gz"], + integrity = "sha256-mUV3N2A8ORVVZbrm3O9yepAe/Kv4MD2ob9YQhB8aOI8=", + urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.41.1/rules_rust-v0.41.1.tar.gz"], ) load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains") rules_rust_dependencies() -load("@rules_rust//util/import:deps.bzl", "import_deps") - -import_deps() - rust_register_toolchains() load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies") @@ -46,3 +43,7 @@ load("@third_party//:defs.bzl", "crate_repositories") crate_repositories() +load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies") + +rust_analyzer_dependencies() + diff --git a/src/main.rs b/src/main.rs index 07d1d7a..29b450d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,3 @@ -import::import! { - "//third_party/hex"; - "//third_party/sha2"; - "//third_party/clap"; -} - use clap::Parser; use myhasher_lib as myhasher; use std::fs::read_dir; diff --git a/src/myhasher.rs b/src/myhasher.rs index f56907a..a9d0a8b 100644 --- a/src/myhasher.rs +++ b/src/myhasher.rs @@ -1,7 +1,3 @@ -import::import! { - "//third_party/sha2"; -} - use std::io::prelude::BufRead; use std::io::Result; @@ -25,10 +21,6 @@ pub fn hash(buf_reader: &mut dyn BufRead, filename: &str) -> Result