Skip to main content

Module export

Module export 

Source

Functions§

export_project
Packages project into a standalone folder at output_dir: the prebuilt runtime export template (see find_template), renamed to the project’s name, plus a res/ folder holding the project’s assets, scripts, and scenes — the exact layout runtime’s own res_dir/ load_manifest expect. Pure file copying, no compilation — see the export/compile implementation plan for why.
find_template 🔒
Locates the prebuilt runtime export template next to the running editor binary: first a templates/ subfolder (how a packaged editor release ships it), then flat next to the editor exe (how a local cargo build — which puts every workspace binary in the same target/<profile>/ directory — makes it available with no extra packaging step in dev).
package_into 🔒
The actual file-copying steps, factored out of export_project so they can be exercised in a test without depending on find_template’s env::current_exe-based lookup.
sanitize_file_name 🔒
Strips characters Windows filenames disallow from a project name, for the exported exe’s file name.