I am looking into doing a toy-project on Concordium - compiling a simple language into .wasm, and using it for smart contracts.
When looking at generated .wasm files (for example from the piggy_bank example), I see a set of imported functions:
(import "concordium" "get_receive_sender" (func $_ZN14concordium_std5prims18get_receive_sender17hd39205c7d0dcf66aE (type 3))) (import "concordium" "get_receive_self_balance" (func $_ZN14concordium_std5prims24get_receive_self_balance17hc54893914a7c6d9dE (type 4))) (import "concordium" "state_entry_size" (func $_ZN14concordium_std5prims16state_entry_size17h25c60b53484a3ddfE (type 5))) (import "concordium" "write_output" (func $_ZN14concordium_std5prims12write_output17hed3dd8123a9ee388E (type 2))) (import "concordium" "state_entry_resize" (func $_ZN14concordium_std5prims18state_entry_resize17h3ec61de16d4731c9E (type 6))) (import "concordium" "state_entry_read" (func $_ZN14concordium_std5prims16state_entry_read17he52c5fb6878ae74fE (type 7))) (import "concordium" "state_entry_write" (func $_ZN14concordium_std5prims17state_entry_write17hd471dfecd7904772E (type 7))) (import "concordium" "state_create_entry" (func $_ZN14concordium_std5prims18state_create_entry17h95c30732be73dd73E (type 8))) (import "concordium" "state_lookup_entry" (func $_ZN14concordium_std5prims18state_lookup_entry17h0bff202e4235f703E (type 8))) (import "concordium" "invoke" (func $_ZN14concordium_std5prims6invoke17h829d429c5bbf3d23E (type 9)))
These functions seems to be documented here: Contract host functions — Concordium documentation
And also a set of exports (which are the functions from the smart contract itself). But there are also several functions that only have a definition and no impl., meaning that they are linked somehow from another wasm module - they are also from the concordium rust std lib:
(func $_ZN14concordium_std5impls153_$LT$impl$u20$concordium_std..traits..HasInitContext$u20$for$u20$concordium_std..types..ExternContext$LT$concordium_std..types..ExternInitContext$GT$$GT$4open17h3517201963d84a13E (type 13))
Now - before I start to dive into the code - will it even be possible to make a valid Concordim .wasm file without using the rust compiler ? If I generate a .wasm file that adheres to the “limitations” as described here: Smart contract modules — Concordium documentation - will I actually be able to deploy it on chain ?
I just started to look into it, and would like somebody from the dev team tell me, if this can be done, or if Concordium is still too early in the development to break out from the default build chain. I hope not, because I have a few cool ideas I want to try out.