DEV Community

Discussion on: Rust and WebAssembly for masses - Introduction

Collapse
 
nickytonline profile image
Nick Taylor

Nice intro to getting started Sendil. I’m still looking to learn rust/WASM.

So when using the #[no_mangle] decorator, it should only be for the public API right? I guess there is no way for rust to know what is public or private, or is that notion just completely removed from the rust language?

Collapse
 
sendilkumarn profile image
Sendil Kumar

Yeah #[no_mangle] is for public.

Everything by default in Rust is private you can use pub to make something public.