bsb-native
bsb-native copied to clipboard
Get belt on opam
@thangngoc89 had asked me if we could get belt on opam.
Belt depends on 3 things:
- a couple js files
- belt_ppx (which brings bs.deriving abstract support for native compilation)
- bspp (which is the preprocessor for conditional compilation)
With all the right files in a folder, and the preprocessors and ppx, you should be able to run the pp and ppx, generate ML code, then use whatever global ocaml is available and compile. You need to generate ML ahead of time because the ppx returns 4.02.3 AST right now and we probably don't want to be stuck with that.
All the code is inside belt_byte, more specifically the makefile which will copy files from the JS version of belt (others).