@kthakore It is preferable to create new topic instead of replying to very old topics. You can use the "Reply as linked topic" button. I created this topic for the new discussion.
--crate-type=cdylib, #[crate_type = "cdylib"] - A dynamic system library will be produced. This is used when compiling a dynamic library to be loaded from another language. This output type will create *.so files on Linux, *.dylib files on macOS, and *.dll files on Windows.
That unfortunately doesn't mention wasm, which leads to questions like this that explain in more detail why wasm uses cdylib.