I have trouble implementing the asset manager to uload files to asset canister for nft images?

in typescript we use this for asset manager:
import { AssetManager } from “@dfinity/assets”;

i want to implement the Assetmanager in rust frontend:

to interact with asset canister from rust frontend , do we have some crate for asset manager in rust or some other way?

my current implementation for asset manager:

dfx uses ic-asset to interact with the asset canister. Have a look at that. It is pretty opinionated, so no guarantees that it is useful for you…

tried it ,
just adding it to toml file gives me this error in trunk serve:
error: failed to run custom build command for libloading v0.5.2

i cheked my xcode dependencies are installed

libloading is a dependency of a dependency of a dependency. I don’t think I can help with that. Is your setup somehow weird? I would expect that if target_os is set to something sensible that it would compile nicely

1 Like

thanks it worked when i use it like this:
[target.‘cfg(not(target_arch = “wasm32”))’.dependencies]

@Severin as mentioned in my question ,the implementation of assetmanager is correct i guess , as i get this error which is backend related and my call is able to reach the backend , am i correct?

or do i have to use ic-asset , i am not sure about it if i have to ?

Yes, correct, this is an error with the backend. assetmanager is making a call and receives back an error from the backend

1 Like

no need for ic-asset then