Skip to content

Commit aa249b5

Browse files
Add Cargo.toml with workspaces as a test
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 8de1e90 commit aa249b5

File tree

3 files changed

+130
-0
lines changed

3 files changed

+130
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[package]
2+
name = "tauri-runtime"
3+
version = "1.0.0-alpha.4"
4+
description = "Runtime for Tauri applications"
5+
exclude = [ "CHANGELOG.md", "/target" ]
6+
readme = "README.md"
7+
authors = { workspace = true }
8+
homepage = { workspace = true }
9+
repository = { workspace = true }
10+
categories = { workspace = true }
11+
license = { workspace = true }
12+
edition = { workspace = true }
13+
rust-version = { workspace = true }
14+
15+
[package.metadata.docs.rs]
16+
all-features = true
17+
rustc-args = [ "--cfg", "docsrs" ]
18+
rustdoc-args = [ "--cfg", "docsrs" ]
19+
default-target = "x86_64-unknown-linux-gnu"
20+
targets = [
21+
"x86_64-pc-windows-msvc",
22+
"x86_64-unknown-linux-gnu",
23+
"x86_64-apple-darwin",
24+
"x86_64-linux-android",
25+
"x86_64-apple-ios"
26+
]
27+
28+
[dependencies]
29+
serde = { version = "1.0", features = [ "derive" ] }
30+
serde_json = "1.0"
31+
thiserror = "1.0"
32+
tauri-utils = { version = "2.0.0-alpha.10", path = "../tauri-utils" }
33+
http = "0.2.4"
34+
raw-window-handle = "0.5"
35+
url = { version = "2" }
36+
37+
[target."cfg(windows)".dependencies.windows]
38+
version = "0.51"
39+
features = [ "Win32_Foundation" ]
40+
41+
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
42+
gtk = { version = "0.18", features = [ "v3_24" ] }
43+
44+
[target."cfg(target_os = \"android\")".dependencies]
45+
jni = "0.21"
46+
47+
[target."cfg(target_os = \"macos\")".dependencies]
48+
url = "2"
49+
50+
[features]
51+
devtools = [ ]
52+
macos-private-api = [ ]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[
2+
{
3+
"type": "cargo",
4+
"namespace": null,
5+
"name": "rustup",
6+
"version": "1.17.0",
7+
"qualifiers": {},
8+
"subpath": null,
9+
"primary_language": "Rust",
10+
"description": "Manage multiple rust installations with ease",
11+
"release_date": null,
12+
"parties": [
13+
{
14+
"type": "person",
15+
"role": "author",
16+
"name": "Diggory Blake",
17+
"email": "diggsey@googlemail.com",
18+
"url": null
19+
}
20+
],
21+
"keywords": [],
22+
"homepage_url": "https://github.com/rust-lang/rustup.rs",
23+
"download_url": null,
24+
"size": null,
25+
"sha1": null,
26+
"md5": null,
27+
"sha256": null,
28+
"sha512": null,
29+
"bug_tracking_url": null,
30+
"code_view_url": null,
31+
"vcs_url": "https://github.com/rust-lang/rustup.rs",
32+
"copyright": null,
33+
"holder": null,
34+
"declared_license_expression": "mit OR apache-2.0",
35+
"declared_license_expression_spdx": "MIT OR Apache-2.0",
36+
"license_detections": [
37+
{
38+
"license_expression": "mit OR apache-2.0",
39+
"matches": [
40+
{
41+
"score": 100.0,
42+
"start_line": 1,
43+
"end_line": 1,
44+
"matched_length": 5,
45+
"match_coverage": 100.0,
46+
"matcher": "1-hash",
47+
"license_expression": "mit OR apache-2.0",
48+
"rule_identifier": "mit_or_apache-2.0_15.RULE",
49+
"rule_relevance": 100,
50+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_15.RULE",
51+
"matched_text": "MIT OR Apache-2.0"
52+
}
53+
],
54+
"identifier": "mit_or_apache_2_0-480eec53-1a80-0150-7c7e-39cf79c9f3a8"
55+
}
56+
],
57+
"other_license_expression": null,
58+
"other_license_expression_spdx": null,
59+
"other_license_detections": [],
60+
"extracted_license_statement": "MIT OR Apache-2.0",
61+
"notice_text": null,
62+
"source_packages": [],
63+
"file_references": [],
64+
"extra_data": {},
65+
"dependencies": [],
66+
"repository_homepage_url": "https://crates.io/crates/rustup",
67+
"repository_download_url": "https://crates.io/api/v1/crates/rustup/1.17.0/download",
68+
"api_data_url": "https://crates.io/api/v1/crates/rustup",
69+
"datasource_id": "cargo_toml",
70+
"purl": "pkg:cargo/rustup@1.17.0"
71+
}
72+
]

tests/packagedcode/test_cargo.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ def test_parse_cargo_toml_rustup(self):
6565
packages_data = cargo.CargoTomlHandler.parse(test_file)
6666
self.check_packages_data(packages_data, expected_loc, regen=REGEN_TEST_FIXTURES)
6767

68+
def test_parse_cargo_toml_rustup(self):
69+
test_file = self.get_test_loc('cargo/cargo_toml/tauri/Cargo.toml')
70+
expected_loc = self.get_test_loc('cargo/cargo_toml/tauri/Cargo.toml.expected')
71+
packages_data = cargo.CargoTomlHandler.parse(test_file)
72+
self.check_packages_data(packages_data, expected_loc, regen=REGEN_TEST_FIXTURES)
73+
6874
def test_parse_cargo_lock_sample1(self):
6975
test_file = self.get_test_loc('cargo/cargo_lock/sample1/Cargo.lock')
7076
expected_loc = self.get_test_loc('cargo/cargo_lock/sample1/output.expected.json')

0 commit comments

Comments
 (0)