pub fn run() -> !
Expand description
Compiles and runs a JSON-based program using the Jsonpiler. This function performs the following steps:
- Parses the first CLI argument as the input JSON file path.
- Reads the file content into a string.
- Parses it into a
Json
structure. - Compiles it into assembly.
- Assembles to
.obj
. - Links to
.exe
. - Executes the
.exe
. - Exits with its exit code.
§Panics
Panics if:
- Not on Windows
- Incorrect CLI arguments
- File read, parse, compile, assemble, link, execute, or wait fails
- Invalid filename or working directory
§Notes
Requires as
and ld
in PATH.
Terminates with error_exit
on failure (exit code 1).
§Example
./jsonpiler test.json
§Platform
Windows only.