Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
086fab8
docs: design Compass Code Graph v1
forhappy Jul 28, 2026
863ffb7
docs: add Compass Code Graph v1 implementation plan
forhappy Jul 28, 2026
ab1537e
feat(model): define Compass code graph v1
forhappy Jul 28, 2026
501228d
refactor: isolate raw graph extraction facts
forhappy Jul 28, 2026
ff9d6c2
feat(graph): normalize trusted v1 records
forhappy Jul 28, 2026
fb1161a
feat(model): add typed graph property projections
forhappy Jul 28, 2026
0a3189d
refactor: read graph data through typed projections
forhappy Jul 28, 2026
f17433b
refactor(graph): consume typed edge metadata
forhappy Jul 28, 2026
53fa470
feat(model): strictly load Compass graph v1
forhappy Jul 28, 2026
8656ca8
feat(graph): derive trusted v1 build evidence
forhappy Jul 28, 2026
eb0b047
feat(core): publish Compass graph v1 artifacts
forhappy Jul 28, 2026
0d29c74
refactor(core): consume typed v1 build artifacts
forhappy Jul 28, 2026
c1b08ab
docs(plan): record v1 publication progress
forhappy Jul 28, 2026
f4421b8
feat(languages): extract database domain facts
forhappy Jul 28, 2026
b4c5473
feat(resolve): add framework route substrate
forhappy Jul 28, 2026
ceed256
feat(frameworks): resolve Python routes
forhappy Jul 28, 2026
623b9f1
feat(frameworks): resolve TypeScript and file routes
forhappy Jul 28, 2026
81e745b
fix(core): preserve trusted v1 history artifacts
forhappy Jul 28, 2026
9976d1a
feat(frameworks): resolve PHP Ruby and JVM routes
forhappy Jul 28, 2026
a727414
feat(frameworks): resolve native server routes
forhappy Jul 28, 2026
bfa46d5
feat(domain): resolve enterprise graph facts
forhappy Jul 28, 2026
086a67f
feat(query): define shared code query contract
forhappy Jul 28, 2026
78019f8
feat(query): index and traverse trusted code graph
forhappy Jul 28, 2026
5c7f0fd
feat: expose shared code graph queries
forhappy Jul 28, 2026
e19bcc4
feat(viewer): present code graph evidence
forhappy Jul 28, 2026
458bd1f
feat(vscode): explore trusted code graph evidence
forhappy Jul 28, 2026
9b9c9f7
fix(graph): qualify strict v1 publication
forhappy Jul 28, 2026
fb881aa
test: qualify Compass code graph v1
forhappy Jul 28, 2026
1a37a61
docs: keep Code Graph v1 Compass-native
forhappy Jul 28, 2026
ef9c7d6
Merge remote-tracking branch 'origin/main' into codex/compass-code-gr…
forhappy Jul 29, 2026
ac4cff7
fix(ci): clear Code Graph v1 release blockers
forhappy Jul 29, 2026
ac02d85
fix(release): enforce internal inference boundary
forhappy Jul 29, 2026
0ba187e
docs: correct media acquisition ownership
forhappy Jul 29, 2026
a5200e3
Harden Compass framework semantics
forhappy Jul 29, 2026
702955f
fix(code-query): enforce bounded secure typed responses
forhappy Jul 29, 2026
33ed9ef
Fix framework pipeline target assertion
forhappy Jul 29, 2026
e20dc4d
fix(code-graph): preserve typed versioned semantics
forhappy Jul 29, 2026
bfaf511
Document framework semantics hardening
forhappy Jul 29, 2026
338d9f8
Keep Task 1 report local
forhappy Jul 29, 2026
072566d
fix(build): publish sealed output generations atomically
forhappy Jul 29, 2026
da380ee
docs: record code graph release blocker dispositions
forhappy Jul 29, 2026
00b7a79
fix(code-graph): allow symbol-level imports
forhappy Jul 29, 2026
74749a2
test(history): use a supported semantic evidence origin
forhappy Jul 29, 2026
6197efb
test(history): anchor trusted typed evidence
forhappy Jul 29, 2026
cfb29c9
fix(build): avoid unchecked generation assumptions
forhappy Jul 29, 2026
ad8f99a
fix(code-query): name bounded path result type
forhappy Jul 29, 2026
26de2ef
refactor(code-graph): group publication evidence
forhappy Jul 29, 2026
ae307cc
fix(code-graph): preserve declaration and call semantics
forhappy Jul 29, 2026
f8e6fff
test(cli): resolve published graph generation
forhappy Jul 29, 2026
63ef5eb
fix(cli): resolve active output generations
forhappy Jul 29, 2026
05336bb
fix(code-graph): eliminate false resolver hubs
forhappy Jul 29, 2026
5abda8e
test(build): follow active output generations
forhappy Jul 29, 2026
2fe349c
fix(history): ingest active build generations
forhappy Jul 29, 2026
10c3afd
fix(history): borrow resolved generation path
forhappy Jul 29, 2026
80f24d4
fix(vscode): follow active graph generations
forhappy Jul 29, 2026
59e2d65
fix(qualification): resolve active graph generations
forhappy Jul 29, 2026
f11010e
fix(code-graph): scope synthesized topology
forhappy Jul 29, 2026
e723574
fix(files): ignore Git worktree pointer metadata
forhappy Jul 29, 2026
a0c7d19
test(query): scope remap fixture lint
forhappy Jul 29, 2026
02bdd7d
fix(history): decode typed graph root records
forhappy Jul 29, 2026
c0531d8
fix(code-graph): preserve remap ambiguity evidence
forhappy Jul 29, 2026
e496939
fix(code-graph): compare merged evidence deterministically
forhappy Jul 29, 2026
8c32d2b
fix(cli): resolve active Program IR generation
forhappy Jul 29, 2026
478cd98
fix(code-graph): retain sequential rewrite evidence
forhappy Jul 29, 2026
57b3669
fix(code-graph): satisfy strict graph lints
forhappy Jul 29, 2026
78395ac
test(core): follow active build generations
forhappy Jul 29, 2026
8f25c60
fix(code-graph): preserve relationship occurrences
forhappy Jul 29, 2026
c054e5a
test(program): follow active build generations
forhappy Jul 29, 2026
745168e
test(mcp): assert typed tool errors
forhappy Jul 29, 2026
ffe6a1b
fix(code-graph): harden occurrence provenance
forhappy Jul 29, 2026
eefaebd
fix(rust): scope method graph identities by impl
forhappy Jul 29, 2026
2de9a36
fix(code-graph): preserve typed occurrence provenance
forhappy Jul 29, 2026
2b2b71f
fix(code-graph): scope generic method identities
forhappy Jul 29, 2026
31f6f16
fix(code-graph): retain trusted incremental provenance
forhappy Jul 29, 2026
5132e1c
fix(code-graph): validate endpoint rewrite evidence
forhappy Jul 29, 2026
eef4d3c
fix(code-graph): scope PHP method identities
forhappy Jul 29, 2026
17870c4
fix(code-graph): scope Markdown heading identities
forhappy Jul 29, 2026
6ff8b0b
fix(code-graph): enforce typed rewrite provenance
forhappy Jul 29, 2026
765dc43
fix(code-graph): normalize producer endpoint shapes
forhappy Jul 29, 2026
d18c3bf
fix(code-graph): authorize trusted endpoint changes
forhappy Jul 29, 2026
20f0500
fix(routes): scope alias limits per source file
forhappy Jul 29, 2026
a91364f
fix(routes): bound ambiguous candidate resolution
forhappy Jul 29, 2026
58b934b
fix(code-graph): harden v1 publication resilience
forhappy Jul 29, 2026
26f5d51
fix(code-graph): close publication resilience gaps
forhappy Jul 29, 2026
23ff8c6
fix(code-graph): close final reliability gaps
forhappy Jul 29, 2026
0ab0dfa
fix(code-graph): preserve valid import targets
forhappy Jul 29, 2026
109ed81
fix(code-graph): disambiguate unowned repeated symbols
forhappy Jul 29, 2026
be8f95d
fix(routes): avoid nested config duplicates
forhappy Jul 29, 2026
bd25a81
fix: harden versioned graph reads and bounds
forhappy Jul 29, 2026
508b5b9
fix(code-graph): harden language and SQL semantics
forhappy Jul 29, 2026
f58bb91
fix(code-graph): harden SQL statement boundaries
forhappy Jul 29, 2026
7c44e9c
fix(code-graph): recover SQL scanner boundaries
forhappy Jul 29, 2026
bbe0d24
fix(code-graph): finalize SQL boundary recovery
forhappy Jul 29, 2026
78860f1
fix(code-graph): scope SQL recovery and CTE bindings
forhappy Jul 29, 2026
6184a19
fix(code-graph): finalize SQL lexical scopes
forhappy Jul 29, 2026
af78de3
fix(code-graph): unify SQL lexical analysis
forhappy Jul 29, 2026
6663093
fix(code-graph): harden unified SQL lexing
forhappy Jul 29, 2026
1176902
fix(code-graph): enforce SQL token boundaries
forhappy Jul 29, 2026
487704d
fix(code-graph): align SQL lexical proof
forhappy Jul 29, 2026
e748d51
fix(code-graph): harden SQL lexical roles
forhappy Jul 29, 2026
4cabc3f
fix(code-graph): bound SQL parser roles
forhappy Jul 29, 2026
7b8e85f
feat(languages): emit missing code graph semantics
forhappy Jul 29, 2026
3701dd4
fix(languages): harden semantic producer facts
forhappy Jul 29, 2026
882dba9
fix(languages): repair scoped containment evidence
forhappy Jul 29, 2026
3582578
fix(model): accept enum member containment
forhappy Jul 29, 2026
13942fc
fix(languages): own semantic containment facts
forhappy Jul 29, 2026
dd926ad
fix(graph): scope unresolved external placeholders
forhappy Jul 29, 2026
a8ee491
fix(graph): honor external placeholder scope
forhappy Jul 29, 2026
dc7ead0
fix(resolve): stamp Python import provenance
forhappy Jul 29, 2026
3cdcc6a
fix: close remaining graph publication gaps
forhappy Jul 29, 2026
d58e15c
fix: close reviewed graph merge gaps
forhappy Jul 29, 2026
112658b
fix: reconcile mixed edge cardinality
forhappy Jul 29, 2026
e30af9a
fix: rebind remapped semantic residues
forhappy Jul 29, 2026
14a4383
fix(core): refresh mixed semantic nodes
forhappy Jul 29, 2026
9e40426
fix(core): make forced updates deterministic
forhappy Jul 29, 2026
0cc9204
test: add code graph v1 semantic qualification oracle
forhappy Jul 29, 2026
e9f6e00
fix(resolve): preserve Python import occurrences
forhappy Jul 29, 2026
66a4298
test: cover code graph qualification oracle
forhappy Jul 29, 2026
f958364
fix(model): restore enum member containment
forhappy Jul 29, 2026
2db88e7
fix(core): isolate force cache reuse from graph input
forhappy Jul 29, 2026
e3529ff
test(core): align semantic reuse contract
forhappy Jul 29, 2026
22d59ac
fix(resolve): validate Python import statements atomically
forhappy Jul 29, 2026
c672d82
fix(resolve): enforce Python import token grammar
forhappy Jul 29, 2026
3e5ce3b
fix(graph): make incremental publication deterministic
forhappy Jul 29, 2026
763e256
fix(graph): make framework identities checkout portable
forhappy Jul 29, 2026
d3be88c
fix(graph): bound and index production workloads
forhappy Jul 30, 2026
a22c62f
fix(cli): canonicalize embedded asset line endings
forhappy Jul 30, 2026
1020d3f
fix(code-graph): bound enterprise runtime work
forhappy Jul 30, 2026
ff56818
test(code-graph): certify bounded production scale
forhappy Jul 30, 2026
4c0cc74
fix(code-graph): preserve clustered edge direction
forhappy Jul 30, 2026
120e9c6
test(code-graph): validate full-scale query fixture
forhappy Jul 30, 2026
f469ff7
test(code-graph): assert published diagnostic identities
forhappy Jul 30, 2026
3edb68f
fix(viewer): refresh embedded code graph assets
forhappy Jul 30, 2026
c199ebe
test(watch): accept split polling batches
forhappy Jul 30, 2026
8742195
fix(publication): flush artifacts with writable handles
forhappy Jul 30, 2026
132c841
test(code-graph): stabilize enterprise scale ceiling
forhappy Jul 30, 2026
e38d5eb
fix(windows): harden graph and index publication
forhappy Jul 30, 2026
3ac287e
fix(installer): normalize checksum without invalid continuation
forhappy Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
crates/compass-cli/assets/vendor/pierre-diffs-v1.2.12.js -whitespace
crates/compass-output/assets/viewer/graph.js -whitespace
crates/compass-cli/assets/compass-skill/** text eol=lf
51 changes: 50 additions & 1 deletion .github/workflows/compass-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ defaults:
working-directory: .

jobs:
code-graph-v1-fixtures:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "24.13.1"
cache: npm
- name: Install pinned Rust toolchain
uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # master
with:
toolchain: 1.97.1
components: rustfmt, clippy
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
workspaces: .
- run: npm ci
- run: npx playwright install --with-deps chromium
- name: Qualify Compass code graph v1
run: ./scripts/qualify_code_graph_v1.sh --fixtures-only

javascript-and-vscode:
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -81,7 +102,10 @@ jobs:
run: cargo nextest run --workspace --lib --bins --locked

- name: Verify publishable crate archives
run: cargo package --workspace --locked --no-verify
run: |
cargo package --workspace --locked --no-verify \
--exclude compass-transcribe \
--exclude compass-whisper

- name: Verify cargo install and standalone launch
shell: bash
Expand Down Expand Up @@ -140,6 +164,11 @@ jobs:
- name: Native tests
run: cargo test --workspace --lib --bins --locked --target ${{ matrix.target }}

- name: Code graph deterministic publication and SQLite recovery
run: |
cargo test -p compass-core --test code_graph_v1_determinism --locked --target ${{ matrix.target }}
cargo test -p compass-query --test index_recovery --locked --target ${{ matrix.target }}

- name: Test PowerShell installer
if: runner.os == 'Windows'
shell: pwsh
Expand All @@ -148,6 +177,26 @@ jobs:
./scripts/test_install_ps1.ps1 `
-CompassBinary "target/${{ matrix.target }}/release/compass.exe"

code-graph-client-platforms:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-24.04, macos-15, windows-2025]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "24.13.1"
cache: npm
- run: npm ci
- name: Source containment and process cancellation
run: >-
npm exec -w editors/vscode --
vitest run
src/views/sourceResolution.test.ts
src/cli/processManager.test.ts

dependency-audit:
runs-on: ubuntu-24.04
steps:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

- Introduce the first supported Compass code graph contract,
`compass.graph/1`, as a strict versioned NetworkX-compatible multigraph with
structural, framework, enterprise, messaging, job, schema, configuration,
and database kinds.
- Add explicit `routes_to` bindings for supported server and file-routing
frameworks, preserving middleware order and attributable heuristic wiring.
- Add the shared `compass.query/1` search, callers, callees, impact, explore,
and node-trail contract across CLI, MCP, the viewer, and VS Code.
- Hard-cut over graph persistence: artifacts without `compass.graph/1` are not
loaded through an adapter. Run `compass update` to rebuild them.
- Correct C function identities by resolving the callable declarator before
generic declaration names, including macro-heavy SQLite declarations.
- Preserve repeated Markdown sections and rationale entries as distinct
Expand Down
24 changes: 20 additions & 4 deletions Cargo.lock

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

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ members = [
"vendor/compass-tree-sitter-language-pack",
]
resolver = "3"
exclude = ["fuzz"]
exclude = ["fuzz", "vendor/gemm-common"]

[workspace.package]
version = "0.1.10"
Expand Down Expand Up @@ -71,6 +71,8 @@ oxidize-pdf = { version = "4.1.1", default-features = false, features = ["compre
ctrlc = "3.5.2"
strsim = "0.11"
rayon = "1"
rusqlite = { version = "0.31.0", features = ["bundled", "modern_sqlite"] }
rustix = { version = "1.1", features = ["fs"] }
rand = "0.8.7"
realfft = "3.5.0"
regex = "1"
Expand Down Expand Up @@ -125,3 +127,6 @@ codegen-units = 1
lto = "thin"
panic = "abort"
strip = "symbols"

[patch.crates-io]
gemm-common = { path = "vendor/gemm-common" }
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ test-product: ## Run the Compass CLI product contract
test-release-scripts: ## Test packaging and download installer scripts
sh scripts/test_release_scripts.sh

.PHONY: qualify-code-graph-v1
qualify-code-graph-v1: ## Run the complete Compass code graph v1 fixture release gate
./scripts/qualify_code_graph_v1.sh --fixtures-only

# ── Lint & Format ──────────────────────────────────────────────────

.PHONY: fmt
Expand Down
4 changes: 2 additions & 2 deletions crates/compass-analysis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
compass-ir = { path = "../compass-ir" }
compass-model = { path = "../compass-model" }
compass-ir = { path = "../compass-ir", version = "0.1.4" }
compass-model = { path = "../compass-model", version = "0.1.4" }
rayon.workspace = true
serde.workspace = true
sha2.workspace = true
Expand Down
6 changes: 1 addition & 5 deletions crates/compass-analysis/src/universal_call_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,7 @@ fn coverage(
}

fn line(node: &NodeRecord, key: &str) -> Option<u64> {
node.attributes.get(key).and_then(|value| {
value
.as_u64()
.or_else(|| value.as_i64().and_then(|value| value.try_into().ok()))
})
node.unsigned(key)
}

fn source_line(location: &str) -> Option<u64> {
Expand Down
22 changes: 21 additions & 1 deletion crates/compass-cargo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,26 @@ pub fn introspect_cargo(root: &Path) -> Result<CargoGraph, CargoIntrospectionErr
id: manifest.id.clone(),
attributes: Map::from_iter([
("label".to_owned(), Value::String(name.clone())),
("name".to_owned(), Value::String(name.clone())),
("qualified_name".to_owned(), Value::String(name.clone())),
(
"symbol_kind".to_owned(),
Value::String("package".to_owned()),
),
("file_type".to_owned(), Value::String("code".to_owned())),
("language".to_owned(), Value::String("rust".to_owned())),
(
"source_file".to_owned(),
Value::String(relative_posix(&manifest.path, &root)?),
),
("source_location".to_owned(), Value::String("L1".to_owned())),
("line_start".to_owned(), Value::from(1)),
("line_end".to_owned(), Value::from(1)),
("_origin".to_owned(), Value::String("ast".to_owned())),
(
"extractor".to_owned(),
Value::String("compass.cargo".to_owned()),
),
]),
});
}
Expand Down Expand Up @@ -141,7 +156,7 @@ pub fn introspect_cargo(root: &Path) -> Result<CargoGraph, CargoIntrospectionErr
attributes: Map::from_iter([
(
"relation".to_owned(),
Value::String("crate_depends_on".to_owned()),
Value::String("depends_on".to_owned()),
),
(
"context".to_owned(),
Expand All @@ -154,6 +169,11 @@ pub fn introspect_cargo(root: &Path) -> Result<CargoGraph, CargoIntrospectionErr
),
("source_file".to_owned(), Value::String(source_file.clone())),
("source_location".to_owned(), Value::String("L1".to_owned())),
("_origin".to_owned(), Value::String("ast".to_owned())),
(
"extractor".to_owned(),
Value::String("compass.cargo".to_owned()),
),
]),
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ whether a Compass capability is covered by the installed skill. Run

- `compass capabilities`: report versioned, read-only machine contracts for
editor and automation integrations.
- `compass search`: find typed symbols by name using the local FTS index.
- `compass callers`: list direct typed call-graph predecessors.
- `compass callees`: list direct typed call-graph successors.
- `compass impact`: compute bounded transitive change impact, excluding
heuristic evidence unless explicitly requested.
- `compass explore`: return related source grouped by file plus connecting
paths in one bounded response.
- `compass node`: show an attributable evidence trail between two symbols.
- `compass call-graph`: trace bounded callers, callees, or both from a source
position or structural symbol, with optional Program IR enrichment.
- `compass query`: natural-language graph traversal or deterministic CompassQL.
Expand Down
13 changes: 13 additions & 0 deletions crates/compass-cli/assets/compass-skill/references/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,25 @@ compass query "authentication flow" --at HEAD~20
## Focused graph operations

```bash
compass search PaymentGateway
compass callers PaymentGateway.charge
compass callees CheckoutController.create
compass impact authorizePayment --max-depth 3
compass explore CheckoutController PaymentGateway --root .
compass node route:/checkout CheckoutController.create
compass explain PaymentGateway
compass path CheckoutHandler PaymentGateway
compass affected authorizePayment --depth 3
compass tree
```

- `search` resolves typed symbols by exact or fuzzy name.
- `callers` and `callees` walk one attributable call-graph hop.
- `impact` traverses a bounded transitive radius and excludes heuristic
evidence by default.
- `explore` returns related source and paths together under source and response
byte limits.
- `node` exposes the evidence trail and provenance between two symbols.
- `explain` reports a matched node and connected context.
- `path` reports the shortest known graph route; preserve relation direction.
- `affected` follows impact relations and returns a review candidate set.
Expand Down
15 changes: 13 additions & 2 deletions crates/compass-cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ fn collect(root: &Path, directory: &Path, files: &mut Vec<PathBuf>) -> io::Resul
Ok(())
}

fn canonical_text(input: &str) -> String {
input.replace("\r\n", "\n").replace('\r', "\n")
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
println!(
"cargo:rustc-env=COMPASS_BUILD_TARGET={}",
Expand All @@ -45,17 +49,24 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
for directory in ["compass-skill", "compass-integrations"] {
collect(&root, &root.join(directory), &mut files)?;
}
let output = PathBuf::from(env::var("OUT_DIR")?);
let embedded_root = output.join("install-assets");
let mut generated = String::from("static EMBEDDED_ASSETS: &[EmbeddedAsset] = &[\n");
for relative in files {
let source = root.join(&relative);
let embedded = embedded_root.join(&relative);
if let Some(parent) = embedded.parent() {
fs::create_dir_all(parent)?;
}
let body = fs::read_to_string(&source)?;
fs::write(&embedded, canonical_text(&body))?;
generated.push_str(&format!(
" EmbeddedAsset {{ path: {:?}, bytes: include_bytes!({:?}) }},\n",
relative.to_string_lossy().replace('\\', "/"),
source
embedded
));
}
generated.push_str("];\n");
let output = PathBuf::from(env::var("OUT_DIR")?);
fs::write(output.join("install_assets.rs"), generated)?;
Ok(())
}
Loading
Loading