Skip to content

Commit 3d44af0

Browse files
committed
chore: switch to cargo about
1 parent 3f31ff0 commit 3d44af0

File tree

7 files changed

+9912
-33861
lines changed

7 files changed

+9912
-33861
lines changed

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.PHONY: setup
22
setup:
3-
# @echo "installing dependencies..."
4-
# @cargo install cargo-bundle-licenses
53
@echo "creating .venv..."
64
@uv sync --locked
75
@echo "downloading test models..."
@@ -17,9 +15,7 @@ format:
1715
,PHONY: licenses
1816
licenses:
1917
@echo "Generating licenses..."
20-
@cargo bundle-licenses \
21-
--format yaml \
22-
--output THIRDPARTY.yml
18+
@cargo about generate about.hbs > THIRDPARTY.html
2319

2420
.PHONY:
2521
clippy:

THIRDPARTY.html

Lines changed: 9829 additions & 0 deletions
Large diffs are not rendered by default.

THIRDPARTY.yml

Lines changed: 0 additions & 33856 deletions
This file was deleted.

about.hbs

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<html>
2+
3+
<head>
4+
<style>
5+
@media (prefers-color-scheme: dark) {
6+
body {
7+
background: #333;
8+
color: white;
9+
}
10+
a {
11+
color: skyblue;
12+
}
13+
}
14+
.container {
15+
font-family: sans-serif;
16+
max-width: 800px;
17+
margin: 0 auto;
18+
}
19+
.intro {
20+
text-align: center;
21+
}
22+
.licenses-list {
23+
list-style-type: none;
24+
margin: 0;
25+
padding: 0;
26+
}
27+
.license-used-by {
28+
margin-top: -10px;
29+
}
30+
.license-text {
31+
max-height: 200px;
32+
overflow-y: scroll;
33+
white-space: pre-wrap;
34+
}
35+
</style>
36+
</head>
37+
38+
<body>
39+
<main class="container">
40+
<div class="intro">
41+
<h1>Third Party Licenses</h1>
42+
<p>This page lists the licenses of the projects used in cargo-about.</p>
43+
</div>
44+
45+
<h2>Overview of licenses:</h2>
46+
<ul class="licenses-overview">
47+
{{#each overview}}
48+
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
49+
{{/each}}
50+
</ul>
51+
52+
<h2>All license text:</h2>
53+
<ul class="licenses-list">
54+
{{#each licenses}}
55+
<li class="license">
56+
<h3 id="{{id}}">{{name}}</h3>
57+
<h4>Used by:</h4>
58+
<ul class="license-used-by">
59+
{{#each used_by}}
60+
<li><a href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}} {{crate.version}}</a></li>
61+
{{/each}}
62+
</ul>
63+
<pre class="license-text">{{text}}</pre>
64+
</li>
65+
{{/each}}
66+
</ul>
67+
</main>
68+
</body>
69+
70+
</html>

about.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
accepted = [
2+
"Apache-2.0",
3+
"MIT",
4+
"Unicode-3.0",
5+
"MPL-2.0",
6+
"CDLA-Permissive-2.0",
7+
"BSD-3-Clause"
8+
]

encoderfile-core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name = "encoderfile-core"
33
version = "0.1.0"
44
edition = "2024"
5+
license = "Apache-2.0"
6+
license-file = "../LICENSE"
57

68
[[bench]]
79
name = "l2_norm"

encoderfile/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name = "encoderfile"
33
version = "0.1.0"
44
edition = "2024"
5+
license = "Apache-2.0"
6+
license-file = "../LICENSE"
57

68
[[bin]]
79
name = "cli"

0 commit comments

Comments
 (0)