- Install
opam
using this guide - Run following commands:
opam init
opam switch create $(pwd) --with-test -y
eval $(opam env)
dune build && dune install
You can now use tact /path/to/file.tact
Run opam install . --working-dir --deps-only --with-test
Run dune utop lib
Run dune test
Run dune build @fmt --auto-promote
(or no --auto-promote
if you want to review changes, followed
by dune promote
)
ppx_expect
ppx_expect tests allow to check output against an expectation
and upon failure, they produce a diff, which can be easily applied to the original source code by running
dune promote
if the output is deemed to be correct. This allows us to write:
pp source ; [%expect {||}]
to fill in the blanks. In this particular case, it's useful to run dune test --auto-promote
Can be built during dune build
or dune build js
and will be available in
_build/default/js/tact_js.bc.js
In order to build a (smaller) release build, one should run:
dune build js --profile=release