# Generating a candid file after compiling code as wasm32-wasi gives an error

**URL:** <https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249>\
**Category:** Language Support\
**Tags:** Wasm\
**Created:** [December 23, 2024, 12:30pm UTC](https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249 "2024-12-23T12:30:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ydr990318](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ydr990318/32/17541_2.png) [@ydr990318](https://forum.dfinity.org/u/ydr990318)\
**Post date:** [December 23, 2024, 12:30pm UTC](https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249/1 "2024-12-23T12:30:09Z")

</div>

Hey~ @jeshli , sorry to bother you again, I’ve successfully run your rust-connect-py-ai-to-ic project, but since I didn’t have a tokenizer for transcoding, I created a new canister, but the transcoding has to be done with the files vocab.json and merges.txt, which means that it has to be wasm32-wasi for it to work. But after compiling the tokenizer’s canister to wasm32-wasi, and then generating the did file via candid, I got an error

> Error: unknown import: wasi\_snapshot\_preview1::fd\_filestat\_get has not been defined

---

<div class="post-metadata">

**Author:** ![jeshli](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jeshli/32/19879_2.png) [@jeshli](https://forum.dfinity.org/u/jeshli)\
**Post date:** [December 23, 2024, 4:50pm UTC](https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249/2 "2024-12-23T16:50:18Z")

</div>

I will soon be releasing a new open-source implementation that includes a support for any tokenizer if you can wait.

---

<div class="post-metadata">

**Author:** ![ydr990318](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ydr990318/32/17541_2.png) [@ydr990318](https://forum.dfinity.org/u/ydr990318)\
**Post date:** [December 23, 2024, 5:03pm UTC](https://forum.dfinity.org/t/generating-a-candid-file-after-compiling-code-as-wasm32-wasi-gives-an-error/39249/3 "2024-12-23T17:03:37Z")

</div>

What a surprise 😊 . I’ll be waiting. 🤩
