This FIX/SBE engine requires OCaml and the Dune build system. Follow the instructions below for your platform.
-
Install OCaml for Windows
Download and install from: https://fdopen.github.io/opam-repository-mingw/installation/
Or use Diskuv OCaml (DkML):
winget install Diskuv.OCaml
-
Initialize OPAM
opam init -y eval $(opam env)
-
Create OCaml switch (if needed)
opam switch create 4.14.1 eval $(opam env)
-
Install Dune
opam install dune -y
If you prefer a Linux environment:
# Install WSL2
wsl --install
# Inside WSL2
sudo apt update
sudo apt install opam
opam init -y
eval $(opam env)
opam install dune -y# Ubuntu/Debian
sudo apt update
sudo apt install opam
opam init -y
eval $(opam env)
opam switch create 4.14.1
eval $(opam env)
opam install dune -y
# Fedora/RHEL
sudo dnf install opam
opam init -y
# ... rest same as above# Using Homebrew
brew install opam
opam init -y
eval $(opam env)
opam switch create 4.14.1
eval $(opam env)
opam install dune -yOnce OCaml and Dune are installed:
cd d:/ag/FIX-SBE-Engine
# Install project dependencies
opam install . --deps-only -y
# Or install individually
opam install lwt lwt_ppx ppx_deriving yojson xmlm logs fmt alcotest benchmark -y# Build everything
dune build
# Build in release mode (optimized)
dune build --release
# Clean build artifacts
dune clean# Run all tests
dune runtest
# Run specific test
dune exec tests/test_fix_codec.exe
# Verbose test output
dune runtest --display=shortCheck that everything is working:
# Check OCaml version
ocaml --version
# Should show: The OCaml toplevel, version 4.14.1 or higher
# Check Dune version
dune --version
# Should show: 3.7 or higher
# Check OPAM packages
opam listAfter installing dune, make sure to run:
eval $(opam env)Add this to your shell profile (~/.bashrc or ~/.zshrc):
test -r ~/.opam/opam-init/init.sh && . ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || trueIf you get compilation errors, try:
dune clean
opam update
opam upgrade
dune build- Ensure you're using an OCaml-compatible shell (PowerShell, Git Bash, or WSL)
- Some packages may require MinGW or MSVC toolchain
- Consider using WSL2 for the most compatible experience
cd d:/ag/FIX-SBE-Engine
# Build and test
dune build
dune runtest
# See test output
dune exec tests/test_fix_codec.exe
dune exec tests/test_fix_session.exeIf you encounter installation issues, you can use Docker:
# Create Dockerfile
FROM ocaml/opam:debian-ocaml-4.14
WORKDIR /app
COPY . .
RUN opam install . --deps-only -y
RUN eval $(opam env) && dune build
CMD ["dune", "runtest"]Then run:
docker build -t fix-sbe-engine .
docker run -it fix-sbe-engineAfter successful installation:
- Review the README.md for project overview
- Explore the code in
src/core/ - Run tests to verify functionality
- Check out examples (coming soon)