JSON Parser ported from TypeScript to Rust 1.89.0.
MIT
To ensure cargo install
works for all dependencies, you must install mingw-w64
and the required toolchain:
-
Download and install MSYS2.
-
Open the MSYS2 terminal and run:
pacman -Syu
pacman -S mingw-w64-x86_64-toolchain
- Ensure the MSYS2
mingw64
environment is in your PATH, or use theMSYS2 MinGW 64-bit
terminal for building Rust projects.
This will provide dlltool.exe
and other tools needed for compiling certain crates.
cargo build --workspace
cargo fmt
cargo clippy -p api-actix -p api-axum -p api-rocket -p cli -p shared-lib --all-targets --all-features
cargo test --workspace
To build the CLI:
cargo build -p cli
To run the CLI with input from a file:
cargo run -p cli < input.json
Or, to run the CLI and enter JSON manually (press Ctrl+D to end input):
cargo run -p cli
cargo run -p api-actix
The server will start and listen for HTTP requests (default: http://localhost:8000).
cargo run -p api-axum
The server will start and listen for HTTP requests (default: http://localhost:8080).
cargo run -p api-rocket
The server will start and listen for HTTP requests (default: http://localhost:8000).
- Install the REST Client extension in VSCode.
- Open any
.rest
file in thetestdata/
directory (e.g.,testdata/all.rest
). - Click "Send Request" above a request to send it to the running API server.
- View the response directly in VSCode.
You can modify or add .rest
files in testdata/
to create custom requests for testing.