Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linking with newer rust versions. #89

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions Cargo.lock

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

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] <PATTERN> <PATH>
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion plugins/binaryninja/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
6 changes: 3 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct Args {
pub force_query: bool,
pub include: Vec<String>,
pub exclude: Vec<String>,
pub enable_line_numbers: bool
pub enable_line_numbers: bool,
}

/// Parse command arguments and return them inside the Args structure.
Expand Down Expand Up @@ -256,7 +256,7 @@ pub fn parse_arguments() -> Args {
force_query,
include,
exclude,
enable_line_numbers
enable_line_numbers,
}
}

Expand All @@ -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}
Expand Down
Loading