# Main commands # ~~~~~~~~~~~~~ # Generates all tinantas supported by the program and writes them to stdout. create_tinantas: cargo run --release --bin create_tinantas # Generates all krdantas-prAtipadikas supported by the program and writes them to stdout. create_krdantas: cargo run --release --bin create_krdantas # Unit tests # ~~~~~~~~~~ # Runs all unit tests in the crate. unit_tests: cargo test --lib # Generates a simple coverage report and writes it to disk as an HTML file. coverage: cargo llvm-cov --html # Integration tests # ~~~~~~~~~~~~~~~~~ # Generates all tinantas supported by the program and writes them to disk. create_test_files: cargo build --release ../target/release/create_tinantas --prayoga kartari > test-files/tinantas-basic-kartari.csv ../target/release/create_tinantas --sanadi Ric --prayoga kartari > test-files/tinantas-nic-kartari.csv ../target/release/create_tinantas --sanadi san --prayoga kartari > test-files/tinantas-san-kartari.csv ../target/release/create_tinantas --sanadi yaN --prayoga kartari > test-files/tinantas-yan-kartari.csv ../target/release/create_tinantas --sanadi yaNluk --prayoga kartari > test-files/tinantas-yan-luk-kartari.csv ../target/release/create_tinantas --prayoga karmani > test-files/tinantas-basic-karmani.csv ../target/release/create_tinantas --sanadi Ric --prayoga karmani > test-files/tinantas-nic-karmani.csv ../target/release/create_tinantas --sanadi san --prayoga karmani > test-files/tinantas-san-karmani.csv ../target/release/create_tinantas --sanadi yaN --prayoga karmani > test-files/tinantas-yan-karmani.csv ../target/release/create_krdantas --krt ktvA > test-files/krdantas-ktvA.csv ../target/release/create_krdantas --krt kta > test-files/krdantas-kta.csv # Runs a full evaluation over all forms generated by vidyut-prakriya. `hash` is # the SHA-256 hash of the test file. We use `hash` to verify test file # integrity and ensure that our test cases are stable. # # NOTE: test files might contain invalid forms. Our goal with this test is # simply to confirm that the system hasn't changed in unexpected ways. test_all: test_tinantas test_krdantas test_tinantas: cargo build --release ../target/release/test_tinantas \ --test-cases test-files/tinantas-basic-kartari.csv \ --hash "6964b61ad01cfe81b9b8c58cee957cb10db4462cecfded394ebb4631011c742a" ../target/release/test_tinantas \ --test-cases test-files/tinantas-nic-kartari.csv \ --hash "b95f59ca9b070c2eb09edefbea198ef6d4089f28fb494f06993a7a64864fec61" ../target/release/test_tinantas \ --test-cases test-files/tinantas-san-kartari.csv \ --hash "f6d9f65013aa7b420ce57e138872a1acf72285ccfa860a0b2bcf3789e9867a79" ../target/release/test_tinantas \ --test-cases test-files/tinantas-yan-kartari.csv \ --hash "3badfc693401fb722c640875e06fb3169bd8e04176503c6501a1cd2f24fcec37" ../target/release/test_tinantas \ --test-cases test-files/tinantas-yan-luk-kartari.csv \ --hash "8e55532333708504593040b4b1025a8568f6d23a07cedd3a8f31e155ae0cc2fb" ../target/release/test_tinantas \ --test-cases test-files/tinantas-basic-karmani.csv \ --hash "4878aa3ec45bef354f7bface2d877ca5cc0fa23ab45b5f52507c4ef3c0a1fc06" ../target/release/test_tinantas \ --test-cases test-files/tinantas-nic-karmani.csv \ --hash "d4c46f2533a47085ac2eb1dcc96d81de25e8fb578b94ccd4c86c4536008bab0b" ../target/release/test_tinantas \ --test-cases test-files/tinantas-san-karmani.csv \ --hash "6ae940a39fcda8d8a24b9e5b905f02a4db9c22cb3bc54f9a996c82b24fbb2120" ../target/release/test_tinantas \ --test-cases test-files/tinantas-yan-karmani.csv \ --hash "4e7399574447252f72eb2d36cd85eba8f5f20bd9d38aac8802825ec8aa3fb2dd" test_krdantas: cargo build --release ../target/release/test_krdantas \ --test-cases test-files/krdantas-ktvA.csv \ --hash "1f41354393e7490afe73a2cb7f873bc75c6495a6188f739f5ecac08a2ee725a4" ../target/release/test_krdantas \ --test-cases test-files/krdantas-kta.csv \ --hash "aa72a9d4cec0f82248de228108ab881789962c12fe0094134657a55340822247" test_subantas: cargo run --bin test_subantas -- \ --test-cases test-files/subantas.csv check_rule_coverage: ./scripts/check_rule_coverage.py > report.log # Performance # ~~~~~~~~~~~ # Profiles the program's execution time on OSX. This command will probably not # work on other operating systems. profile-time-osx: cargo instruments -t time --release --example create_all_tinantas > /dev/null # Other # ~~~~~ # Generates project docs and opens them in your default browser. docs: cargo doc --no-deps --open # Web builds # ---------- # Builds WASM module and JS wrapper (pkg/vidyut_prakriya.js). # # This is a release build. Creating it will be slower but smaller and (perhaps) # more performant. wasm_release: wasm-pack build --target web --release # Builds WASM module and JS wrapper (pkg/vidyut_prakriya.js). # # This is a dev build. Creating it will be faster, but size and performance # will not be optimized. wasm_dev: wasm-pack build --target web # Builds a simple web debugger. debugger: ./scripts/run-debugger.sh