Hmm, judging by the phrase “host module” I’d say that this is a problem in the WASM compilation step. It’s looking for a piece of the HDK that’s missing. Can I ask you how you installed your dev environment, and what you see when you type in hc --version?
hey @pauldaoust, thanks for reply… my environment is pretty standard setup. I am able to hc package fine etc…
using holochain 0.0.34-alpha1 + holonix 0.0.39
i will try to repeat the code in a later version and see if it works
This means that your WASM module defines an import _ZN3hdk10global_fns10write_json17h75a7ef5ec08f4291E - i.e. it expects to be linked with something that provides an according export of that same name. Since Holochain runs the DNA WASM modules alone, without any other module, it could only be provided by the runtime, i.e. the host module.
The Holochain host module only provides implementations of the HDK API functions, which should be the only imports defined by a proper DNA WASM. The fact that your DNA WASM has this import is the problem. I can’t say much about the reason for this without seeing your Cargo.toml. Also, the toolchain with which you’ve compiled the WASM might be causing this. Are you compiling from a Holonix nix-shell?