github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/examples/allocation/rust/testdata/Cargo.toml (about)

     1  [package]
     2  name = "greet"
     3  version = "0.1.0"
     4  edition = "2021"
     5  
     6  [lib]
     7  # cdylib builds a a %.wasm file with `cargo build --release --target wasm32-unknown-unknown`
     8  crate-type = ["cdylib"]
     9  name = "greet"
    10  path = "greet.rs"
    11  
    12  [dependencies]
    13  # wee_aloc is a WebAssembly optimized allocator, which is needed to use non-numeric types like strings.
    14  # See https://docs.rs/wee_alloc/latest/wee_alloc/
    15  wee_alloc = "0.4.5"
    16  
    17  # Below settings dramatically reduce wasm output size
    18  # See https://rustwasm.github.io/book/reference/code-size.html#optimizing-builds-for-code-sizewasm-opt -Oz -o
    19  # See https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
    20  [profile.release]
    21  opt-level = "z"
    22  lto = true
    23  codegen-units = 1