Closed pkel closed 3 years ago
The first rule navigates the file system with relative paths. This does not work if qcert is symlink into another project.
Additionally, the use of npm breaks opam build.
Idea: move the two rules into the assemblyscript dir, create the ml file there, add dune file and create library. Dune will figure out the locations for us
For reference, error when doing opam install .
### output ###
# Use Stdlib instead.
# [...]
# If you need to stay compatible with OCaml < 4.07, you can use the
# stdlib-shims library: https://github.com/ocaml/stdlib-shims
File "compiler/dune", line 34, characters 0-253:
# 34 | (rule
# 35 | (target wasm_runtime.ml)
# 36 | (deps runtime.wasm)
# ....43 | )
# 44 | )
# 45 | )
# Error: No rule found for compiler/runtime.wasm
Progress in 48bfd7f.
Compiled-to-wasm contracts depend on a
runtime.wasm
module for execution. This module is implemented in another language (currently AssemblyScript, see/runtimes/assemblyscript
). The module has to be shipped as part of the qcert opam package.Currently, we use a dune to
runtime.wasm
in the runtime treeruntime.wasm
to the compiler treewasm_runtime.ml
Wasm_runtime.runtime_wasm
OCaml moduleThe rules looks like this
Practical, but not particularly nice.
Dune (recently?!) added support for shipping additional files and locate/load them at runtime. It's marked experimental in the dune documentation. As soon as there is a stable API, we might consider replacing the above mechanism with the new.