( env_consts_ptr: LeanList<LeanBorrowed<'_>>, )
| 91 | /// FFI function to build a reference graph from a Lean environment. |
| 92 | #[unsafe(no_mangle)] |
| 93 | pub extern "C" fn rs_build_ref_graph( |
| 94 | env_consts_ptr: LeanList<LeanBorrowed<'_>>, |
| 95 | ) -> LeanIOResult<LeanOwned> { |
| 96 | let rust_env = decode_env(env_consts_ptr); |
| 97 | let rust_env = Arc::new(rust_env); |
| 98 | let ref_graph = build_ref_graph(&rust_env); |
| 99 | let mut cache = LeanBuildCache::with_capacity(rust_env.len()); |
| 100 | let result = build_ref_graph_array(&mut cache, &ref_graph.out_refs); |
| 101 | LeanIOResult::ok(result) |
| 102 | } |
| 103 | |
| 104 | /// FFI function to compute SCCs from a Lean environment. |
| 105 | #[unsafe(no_mangle)] |
nothing calls this directly
no test coverage detected