import ctypes malib = ctypes.CDLL("./target/release/libpy.so") fct_afficher = malib.afficher fct_afficher.argtypes = [ ctypes.c_char_p, ctypes.c_int ] fct_afficher.restype = ctypes.c_int; r = fct_afficher( "bonjour - éèà".encode( "utf-8" ), 42 ) print("le retour est :", r)