#scripting #gamedev #json #format #bevy

ladfile

Language Agnostic Declaration (LAD) file format for the bevy_mod_scripting crate

7 releases (4 breaking)

new 0.5.0 Mar 29, 2025
0.4.0 Mar 16, 2025
0.3.1 Feb 26, 2025
0.2.0 Feb 15, 2025
0.1.1 Feb 12, 2025

#2636 in Game dev

Download history 352/week @ 2025-02-12 189/week @ 2025-02-19 222/week @ 2025-02-26 25/week @ 2025-03-05 131/week @ 2025-03-12 48/week @ 2025-03-19

440 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

25KB
365 lines

Language Agnostic Declaration file

A file format specifying the available exported:

  • functions
  • types
  • primitives
  • documentation

For a bevy game engine project.

Example

See an example of a LAD file here

Features

  • testfile - Include the above testfile as a ladfile::EXAMPLE_LADFILE constant
  • visitor - Provide traits for visiting parts of the LAD file.

lib.rs:

Parsing definitions for the LAD (Language Agnostic Decleration) file format.

The main ideals behind the format are:

  • Centralization, we want to centralize as much of the "documentation" logic in the building of this format. For example, instead of letting each backend parse argument docstrings from the function docstring, we can do this here, and let the backends concentrate on pure generation.
  • Rust centric, the format describes bindings from the Rust side, so we generate rust centric declarations. These can then freely be converted into whatever representaion necessary.

Dependencies

~1.3–2.4MB
~46K SLoC