second-state / wasm-learning

Building Rust functions for Node.js to take advantage of Rust's performance, WebAssembly's security and portability, and JavaScript's ease-of-use. Demo code and recipes.
https://www.secondstate.io/articles/getting-started-with-rust-function/
485 stars 102 forks source link

ocr issue #20

Open cymqqqq opened 3 years ago

cymqqqq commented 3 years ago

Problem: Interpretation of the code: "let mut host_temp_input_filename = String::from("/tmp/");"?

juntao commented 3 years ago

This creates a temp file that starts with /tmp/

The /tmp/ directory is configured in the WASI options to be accessible from the wasm VM.

On Mon, Feb 1, 2021 at 4:40 PM Jack Choi notifications@github.com wrote:

Problem: Interpretation of the code: "let mut host_temp_input_filename = String::from("/tmp/");"?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/second-state/wasm-learning/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACUNQJWCD3LMBB2XNH3MTS4ZSI5ANCNFSM4W4L6Y5A .

-- Michael Yuan, PhD Fast, safe, portable and serverless Rust programs on Node.js, or as a FaaS http://SecondState.io http://cloud.secondstate.io