diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8a0c8ec..528e8e0 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -12,7 +12,7 @@ jobs: - name: Install latest rust toolchain uses: actions-rs/toolchain@v1 with: - toolchain: 1.60.0 + toolchain: 1.63.0 override: true - name: install python dependencies diff --git a/Cargo.lock b/Cargo.lock index 935de3f..8554ea4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,9 +83,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -929,7 +932,7 @@ dependencies = [ [[package]] name = "weggli" -version = "0.2.4" +version = "0.2.5" dependencies = [ "assert_cmd", "cc", diff --git a/Cargo.toml b/Cargo.toml index cfdcd83..a3d21d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,12 @@ [package] name = "weggli" -version = "0.2.4" +version = "0.2.5" authors = ["fwilhelm"] edition = "2018" license = "Apache-2.0" description = "weggli is a fast and robust semantic search tool for C and C++ codebases. It is designed to help security researchers identify interesting functionality in large codebases." - +repository = "https://github.com/weggli-rs/weggli" +rust-version = "1.63.0" [features] python = ["pyo3"] @@ -38,10 +39,10 @@ optional = true nix = "0.25.0" [build-dependencies] -cc = "1.0.73" +cc = "1.0.83" [dev-dependencies] -criterion = {version = "0.3",features = ["html_reports"]} +criterion = { version = "0.3", features = ["html_reports"] } assert_cmd = "2.0.0" predicates = "1" diff --git a/README.md b/README.md index 87ec234..959708c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ weggli is inspired by great tools like [Semgrep](https://semgrep.dev/), [Coccine ``` Use -h for short descriptions and --help for more details. - Homepage: https://github.com/googleprojectzero/weggli + Homepage: https://github.com/weggli-rs/weggli USAGE: weggli [OPTIONS] diff --git a/build.rs b/build.rs index 4413d7c..4b0020a 100644 --- a/build.rs +++ b/build.rs @@ -28,6 +28,10 @@ fn main() { .cpp(true) .include("third_party/grammars/") .file("third_party/grammars/weggli-cpp/src/scanner.cc") + // keep all symbols until linking (https://doc.rust-lang.org/rustc/command-line-arguments.html#linking-modifiers-whole-archive) + .link_lib_modifier("+whole-archive") + // don't bundle into rlib, but link to the object files instead (+bundle is incompatible with +whole-archive) (https://doc.rust-lang.org/rustc/command-line-arguments.html#linking-modifiers-bundle) + .link_lib_modifier("-bundle") .flag("-w") .compile("tree-sitter-cpp-scanner"); diff --git a/plugins/binaryninja/requirements.txt b/plugins/binaryninja/requirements.txt index 5a5a008..ff578ca 100644 --- a/plugins/binaryninja/requirements.txt +++ b/plugins/binaryninja/requirements.txt @@ -1,4 +1,4 @@ setuptools wheel setuptools-rust -git+https://github.com/googleprojectzero/weggli@main#egg=weggli +git+https://github.com/weggli-rs/weggli@main#egg=weggli diff --git a/setup.py b/setup.py index 6f6b336..c496085 100644 --- a/setup.py +++ b/setup.py @@ -3,9 +3,11 @@ setup( name="weggli", - version="0.2.4", + version="0.2.5", author="fwilhelm", - url="https://github.com/googleprojectzero/weggli", - rust_extensions=[RustExtension("weggli", binding=Binding.PyO3, features=["python"])], + url="https://github.com/weggli-rs/weggli", + rust_extensions=[ + RustExtension("weggli", binding=Binding.PyO3, features=["python"]) + ], zip_safe=False, ) diff --git a/src/cli.rs b/src/cli.rs index 529ae75..ab931f5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -32,7 +32,7 @@ pub struct Args { pub force_query: bool, pub include: Vec, pub exclude: Vec, - pub enable_line_numbers: bool + pub enable_line_numbers: bool, } /// Parse command arguments and return them inside the Args structure. @@ -256,7 +256,7 @@ pub fn parse_arguments() -> Args { force_query, include, exclude, - enable_line_numbers + enable_line_numbers, } } @@ -267,7 +267,7 @@ mod help { Use -h for short descriptions and --help for more details. - Homepage: https://github.com/googleprojectzero/weggli"; + Homepage: https://github.com/weggli-rs/weggli"; pub const TEMPLATE: &str = "\ {bin} {version}