1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Daml-LF archive reader and decoder.
//!
//! The codegen front-end of the Canton Rust SDK: it reads a `.dar` and decodes
//! its Daml-LF packages into the AST that `canton-codegen` lowers to IR and
//! turns into Rust. Most users never call this crate directly — they run
//! `canton-codegen-cli` (`dpm codegen-rust`).
//!
//! - [`Dar`] — the DAR **container** layer (zip + `MANIFEST.MF` → the raw
//! Daml-LF bytes of the main package and its dependencies).
//! - [`decode_all`] / [`decode_main_package`] — Daml-LF protobuf decode
//! (LF 2.x → typed AST) with the interned-table resolvers.
//!
//! The decode is built **on the official `daml-lf-archive` schema**: the
//! vendored `daml_lf.proto` / `daml_lf2.proto` under `proto/` are Digital
//! Asset's own archive definitions (pinned to a Daml 3.3 snapshot), so the
//! bytes→AST step is machine-generated from the authoritative source rather
//! than hand-written. The interpretation on top (version dispatch, interning,
//! reference resolution) is held to the official **JVM `daml-lf-archive`
//! reader** by a conformance oracle: `tests/oracle.rs` renders the decoded
//! type-signature surface and asserts byte-for-byte agreement with
//! `tools/lf-oracle/LfOracle.scala`, which reads the same DAR through
//! `com.daml:daml-lf-archive-reader` (the decoder Canton itself uses). No JVM
//! is required to *use* the SDK or the codegen — the oracle is dev/CI-only.
pub use ;
pub use ;
/// The generated Daml-LF archive types, from the vendored `.proto` files:
/// `pb::daml_lf_dev` (the `Archive`/`ArchivePayload` wrapper) and
/// `pb::daml_lf_2` (the LF 2 AST — `Package`, `Module`, `DefDataType`, …).