o
    uJAfa	  ã                   @  sH   d dl mZ d dlZd dlmZ dZdZdZdZ	dZ
G d	d
„ d
eƒZdS )é    )ÚannotationsN)ÚFileImplzþ#![crate_name = "{crate_file}"]

/* This function will not be exported and is not
 * directly callable by users of this library.
 */
fn internal_function() -> i32 {{
    return 0;
}}

pub fn {function_name}() -> i32 {{
    return internal_function();
}}
zmextern crate {crate_file};

fn main() {{
    println!("printing: {{}}", {crate_file}::{function_name}());
}}
aº  project('{project_name}', 'rust',
  version : '{version}',
  default_options : ['warning_level=3'])

shlib = static_library('{lib_name}', '{source_file}', install : true)

test_exe = executable('{test_exe_name}', '{test_source_file}',
  link_with : shlib)
test('{test_name}', test_exe)

# Make this library usable as a Meson subproject.
{ltoken}_dep = declare_dependency(
  include_directories: include_directories('.'),
  link_with : shlib)
zq
fn main() {{
    let project_name = "{project_name}";
    println!("This is project {{}}.\n", project_name);
}}
z»project('{project_name}', 'rust',
  version : '{version}',
  default_options : ['warning_level=3'])

exe = executable('{exe_name}', '{source_name}',
  install : true)

test('basic', exe)
c                      s6   e Zd ZdZeZeZeZ	e
ZeZd‡ fdd„Z‡  ZS )ÚRustProjectÚrsÚreturnúT.Dict[str, str]c                   s   t ƒ  ¡ }| j|d< |S )NZ
crate_file)ÚsuperÚ
lib_kwargsÚlowercase_token)ÚselfÚkwargs©Ú	__class__© úG/usr/lib/python3.10/site-packages/mesonbuild/templates/rusttemplates.pyr	   V   s   

zRustProject.lib_kwargs)r   r   )Ú__name__Ú
__module__Ú__qualname__Ú
source_extÚhello_rust_templateÚexe_templateÚhello_rust_meson_templateÚexe_meson_templateÚlib_rust_templateÚlib_templateÚlib_rust_test_templateÚlib_test_templateÚlib_rust_meson_templateÚlib_meson_templater	   Ú__classcell__r   r   r   r   r   M   s    r   )Ú
__future__r   ÚtypingÚTÚmesonbuild.templates.sampleimplr   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   