Is it possible to compile WASM from Rust using C libraries?


I’m attempting to build WASM file from my Rust code which using C library(in particular, a library is sqlite3).

$ cargo build --target wasm32-unknown-emscripten

However, I received an error message from emcc like WARNING:root:emcc: cannot find library "sqlite3"

When I attempt to build code to binary by $ cargo build, rustc can compile it ordinary.
My code looks like below.

// src/
extern "C" {
    pub fn sqlite3_libversion_number() -> ::std::os::raw::c_int;

fn main() {
    println!("Hello with SQLite version {}", unsafe {

pub fn main() {
  println!("cargo:rustc-link-lib={}", "sqlite3");

So, my question is, In the first place, is it possible to compile WASM from Rust code which using C libraries?
Moreover if possible, what are things I’m misunderstanding?