Docs.rs
xpile-0.1.615
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
xpile 0.1.615
Polyglot transpile workbench (Python/C/C++/Rust/Ruchy/Lean ↔ Rust/Ruchy/PTX/WGSL/SPIR-V) with provable contracts at every layer.
Crate
Source
Builds
Feature flags
Hide files
..
hybrid_dot2
hybrid_missing
hybrid_pysibling
hybrid_scale2
hybrid_shell
hybrid_sum
abs_int_float_dunder.py
abs_overflow.py
abs_round_bool.py
abs_val.py
add.py
alias_arg_mutate_reject.py
alias_class_reject.py
alias_oop.py
alias_param_launder.py
all_any_dict.py
ann_optional_mismatch.py
ann_optional_ok.py
annassign_alias_guards.py
any_all_short_circuit.py
any_all_truthy.py
append_demo.py
append_float_widen.py
append_then_mutate_reject.py
aslet_seq_hazard.py
assert_msg.py
assert_tagged_panic.py
asserted.py
assoc_keyword_name.py
attr_chain_alias_append_reject.py
attr_chain_field_append.py
aug_assign.py
aug_assign_float.py
aug_assign_float_int_rhs.py
aug_subscript.py
aug_subscript_index_once.py
augmented_set_ops.py
bare_return_guard.py
bashrs_diff_demo.py
bashrs_realistic_demo.sh
big_sum.py
bigint_bits.py
bigint_factorial.py
bit_invert.py
bits.py
block_index.py
bool_arg_to_call.py
bool_as_int.py
bool_augassign_int.py
bool_bitwise.py
bool_cast.py
bool_contract.py
bool_dict_key.py
bool_float.py
bool_float_compare.py
bool_float_ops.py
bool_format_spec.py
bool_int_annotated_local.py
bool_int_compare.py
bool_op_float_truthy.py
bool_op_truthy_operand.py
bool_op_var.py
bool_reduce.py
bool_to_int_positions.py
boolop_value_union_rejected.py
branch_parity_prebound.py
build_then_append_ok.py
builtins_over_range_dict.py
bump_helper.py
bytes_literal.py
c0_whitespace.py
c_bitwise.c
c_early_return.c
c_if.c
c_int_arith.c
call_arg_reuse.py
call_chain.py
center.py
chain_mutator_diagnostic.py
chain_short_circuit.py
chained_assign.py
chained_assign_scalar.py
chained_compare.py
chained_compare_eval_order.py
chained_compare_side_effect.py
class_constants.py
class_to_struct_contract.py
clone_field_read.py
closure_local.py
closure_multiparam.py
cmp.py
collection_copy.py
collection_literal_builtin.py
comp_2gen_dict_set.py
comp_2gen_range.py
comp_items.py
comp_over_dict.py
comp_over_set_tuple.py
comp_over_str.py
comp_typed_element.py
comp_var_no_leak.py
comp_var_scope.py
compare_builtin.py
compile_rust_to_ptx_demo.rs
const_index_indexerror.py
const_read_only.py
container_alias_disposition.py
container_alias_reject.py
container_panic_typed.py
container_truthiness.py
context_managers.py
continue_in_range.py
contract_backend_trait_demo.yaml
contract_citation_types.py
contract_frontend_trait_demo.tex
countdown.py
counter_oop.py
cross_fn_dict.py
cross_type_dict_membership.py
dataclass_aug_field.py
dataclass_classmethod.py
dataclass_custom_eq.py
dataclass_def.py
dataclass_defaults.py
dataclass_display_float.py
dataclass_display_str.py
dataclass_eq_hash.py
dataclass_field_assign.py
dataclass_fstring_repr.py
dataclass_keyword_field.py
dataclass_kwargs.py
dataclass_methods.py
dataclass_opt_field_ctor.py
dataclass_order.py
dataclass_order_sort.py
dataclass_property.py
dataclass_staticmethod.py
dataclass_use.py
default_param_type.py
default_params.py
del_dict_keyerror.py
del_item.py
del_list_runtime_negidx.py
del_slice.py
dict_bool_key_literal.py
dict_comp.py
dict_comp_items.py
dict_comp_key_reuse.py
dict_copy_ctor.py
dict_counts.py
dict_from_pairs.py
dict_get_compare.py
dict_get_optional.py
dict_insert_during_iter.py
dict_insertion_order.py
dict_items.py
dict_iter.py
dict_iter_value_update.py
dict_key_cast.py
dict_kwarg_ctor.py
dict_lit_noncopy_clone.py
dict_literal_var_key.py
dict_merge.py
dict_merge_mixed.py
dict_ops_edge.py
dict_order_paths.py
dict_pop.py
dict_pop_statement.py
dict_read_positions.py
dict_set_comp_filter.py
dict_set_comp_range.py
dict_setdefault.py
dict_setdefault_stmt.py
dict_subscript_pop.py
dict_union.py
dict_update.py
dict_update_kwargs.py
dict_view_setops.py
dict_views.py
dictcomp_key_reads_binder.py
dictget_default_float.py
dictset_bool_key.py
divmod_builtin.py
divmod_float.py
dunder_arith.py
dunder_arith_ext.py
dunder_call.py
dunder_contains.py
dunder_getitem.py
dunder_len.py
dunder_lt.py
dunder_ne.py
dunder_str_display.py
early_return.py
echo_name.py
empty_constructors.py
empty_explicit_init.py
empty_list_annotated.py
empty_literal_stores.py
empty_set_add.py
enum_basic.py
enumerate_neg_start.py
enumerate_start.py
enumerate_start_comprehension.py
enumerate_start_kwarg.py
enumerate_zip.py
enumerate_zip_standalone.py
enumerate_zip_str.py
everyday_reuse.py
except_allowlist.py
except_as_bind.py
except_base_class.py
except_wrong_type_index.py
expr_or_default.py
factorial.py
ffi_cpython_ext_demo.py
fib.py
field_subscript_alias_reject.py
field_subscript_append.py
field_subscript_append_alias_reject.py
fieldindex_dict_key_reuse.py
file_append.py
file_lines.py
file_read.py
file_write.py
fill_char_one_char.py
filter_lambda.py
find_start_receiver_reuse.py
flags_list.py
float_arith.py
float_dict_value_ok.py
float_div_zero.py
float_floordiv_mod.py
float_floordiv_semantics.py
float_format_width_precision.py
float_hashed_key_rejected.py
float_min_max.py
float_mod_fmod.py
float_pow_overflow.py
float_power.py
float_return_int_literal.py
float_sci_notation.py
float_slot_stores.py
float_str_underscore.py
float_sum_compensated.py
float_width_noprec.py
float_zerodiv_messages.py
floordiv_mod_signs.py
floordiv_signed_zero.py
for_items.py
for_iter_str.py
for_loop_var_semantics.py
for_nested_pair_target.py
for_over_call.py
for_over_set_tuple.py
for_sum.py
for_underscore.py
foreach_field_mut.py
foreach_iter_mut.py
format_builtin.py
format_fill_char.py
format_float_nan.py
format_nan_precision.py
format_positional.py
format_radix_neg.py
format_spec.py
fresh_parity_annotated.py
frozen_dataclass_mutation.py
frozen_dataclass_read_ok.py
frozenset_basic.py
fstr_alt_form_radix.py
fstr_char_format.py
fstr_char_format_rejected.py
fstr_char_format_width.py
fstr_char_format_width_rejected.py
fstr_fill_align_float.py
fstr_float_grouping.py
fstr_float_grouping_default_repr.py
fstr_general.py
fstr_grouping.py
fstr_neg_radix_zeropad.py
fstr_sci_general_width.py
fstr_sci_general_width_rejected.py
fstr_scientific.py
fstr_space_sign.py
fstr_str_precision.py
fstr_str_precision_rejected.py
fstring_bool.py
fstring_debug_repr.py
fstring_dict_get_ok.py
fstring_dict_get_rejected.py
fstring_dict_rejected.py
fstring_float.py
fstring_percent.py
fstring_radix_negative.py
fstring_sign.py
fstring_spec.py
fstring_specs.py
fstring_str_conversion_spec.py
gcd.py
gen_enum_zip_range.py
generator_expr.py
generator_expr_filter.py
generators_eager.py
genexpr_2gen.py
genexpr_tuple_target.py
greet_concat.py
greet_fstring.py
greet_lit.py
gt_ge_le_dunder.py
hash_dunder_set.py
histogram.py
histogram_if.py
identity_comprehension_str.py
if_truthy_narrow.py
in_range.py
in_range_membership.py
index_dunder.py
index_unary_builtin.py
inf_float_literal.py
inferred_bool_callsite.py
init_field_discovery.py
int_arg_float_param.py
int_cast_nonfinite.py
int_cast_range.py
int_div_zero.py
int_float_format_spec.py
int_float_of_bool.py
int_from_str_radix.py
int_literal_float_list.py
int_min_literal.py
int_nonfinite_tag.py
int_past_min_literal.py
int_radix.py
int_radix_prefix.py
int_str_underscore.py
int_sum_overflow.py
int_truthiness.py
integ_float_stats.py
integ_paren_balance.py
integ_word_freq.py
intfloat_cmp_precision.py
isinstance_fold.py
iter_mutation_allowed.py
iter_mutation_reject.py
join_dict_keys.py
join_map_str_tuple.py
kwargs.py
lambda_in_comprehension.py
left_shift_overflow.py
len_cmp_paren.py
len_ctx.py
len_encode_bytes.py
len_list.py
len_str.py
len_str_unicode.py
len_tuple.py
let_sum.py
lettuple_underscore_mut.py
list_aug_extend.py
list_comp.py
list_comp_2gen.py
list_comp_expr.py
list_comp_filter.py
list_comp_range.py
list_concat.py
list_copy_iter_mutate.py
list_count_nonint.py
list_extend.py
list_extend_iterables.py
list_extend_str.py
list_first.py
list_fstring_repr.py
list_insert.py
list_insert_clamp.py
list_local_scan.py
list_membership.py
list_minmax_builtin.py
list_minmax_float.py
list_mutate.py
list_of_list_repeat.py
list_of_tuples.py
list_pop.py
list_pop_statement.py
list_positional_unpack.py
list_query.py
list_range.py
list_remove.py
list_repeat_bool.py
list_reused_var_clone.py
list_sorted_of_set.py
list_spread.py
listcomp_ternary_int_float_reject.py
local_closure_used.py
local_shadows_const.py
loop_body_local_leak.py
loop_control.py
loop_else.py
loop_else_mut.py
loop_local_readonly.py
loop_local_subscript_reuse.py
loop_var_leak.py
loop_var_leak_collection.py
loop_var_leak_literal_iter.py
loop_var_leak_range.py
loop_var_reassign.py
map_filter_named.py
map_filter_range.py
map_filter_typed_param.py
map_lambda.py
match_enum.py
match_or_pattern.py
match_stmt.py
math_2arg.py
math_comb.py
math_domain_error.py
math_factorial.py
math_fn_int_arg.py
math_gcd.py
math_isqrt.py
math_lcm.py
math_module.py
math_more.py
math_perm.py
math_pow_trunc.py
math_round_overflow.py
max_empty_float_gen.py
max_min_dict.py
max_min_tuple.py
max_min_variadic_key.py
membership_needle_coerce.py
method_arg_mutation_reject.py
method_default_args.py
method_keyword_name.py
method_name_collision_reject.py
min_max_mixed_numeric.py
min_max_str.py
min_max_str_list.py
minmax_default.py
minmax_empty_valueerror.py
minmax_float_key.py
minmax_key.py
minmax_sort_tie.py
mixed_float_int.py
mod_mul_i128.py
module_const.py
mul_assign_repeat.py
multi_branch.py
multi_if_comp.py
multiple_except.py
mut_receiver_in_condition.py
mutable_default_mutated.py
names_list.py
neg_float.py
neg_float_signed_zero.py
neg_float_var.py
neg_index.py
neg_index_write.py
neg_int_power.py
neg_nested_index_assign.py
neg_pop_del.py
neg_radix_width.py
neg_runtime_index_assign.py
neg_runtime_list_index.py
negative_slice.py
negative_step_slice.py
nested_aug_assign.py
nested_comp_shadow.py
nested_def_bool_return.py
nested_def_bool_return_rejected.py
nested_default_call.py
nested_dict_assign.py
nested_dict_rmw.py
nested_empty_literal.py
nested_fn.py
nested_fn_block.py
nested_fn_reassign_mut.py
nested_index_assign.py
nested_list.py
nested_literal_float_coerce.py
nested_recursive_capturing.py
nested_recursive_fn.py
nested_splat_arg.py
nested_subscript_pop.py
none_in_tuple.py
none_value_literal.py
not_bool_var.py
not_int_truthiness.py
not_optional.py
notation_demo.tex
num_builtins.py
num_cast.py
one_element_tuple.py
oop_capability_combo.py
oop_explicit_init.py
oop_field_subscript_stores.py
oop_mut_arg_reject.py
oop_mut_methods.py
oop_struct_alias.py
oop_struct_alias_reject.py
oop_sweep8_fixes.py
open_slice.py
optional_contract.py
optional_guard_continue.py
optional_is_none.py
optional_list_literal.py
optional_loop_narrow.py
optional_narrow.py
optional_narrow_branch.py
optional_narrow_compound.py
optional_return.py
optional_some_wrap.py
optional_truthiness.py
or_default_optional.py
ord_chr.py
ord_index.py
ord_single_char.py
param_shadows_const.py
partition_empty_sep.py
pass_stmt.py
percent_d_float.py
percent_format.py
percent_format_bool_float.py
percent_format_radix.py
percent_format_spec.py
pick.py
pop_runtime_negative.py
pow.py
pow_bool_base.py
pow_builtin.py
pow_mod.py
pow_neg_exp_modinv.py
pow_negative_exp.py
pow_negative_modulus.py
prebound_iter_mutation_reject.py
prelude_type_name_rejected.py
print_bool_float.py
print_builtin.py
print_sep_end.py
property_setter.py
property_setter_in_init_rejected.py
property_setter_readonly_rejected.py
radix_underscore.py
raise_guard.py
raise_typed_payload.py
range_negative_step.py
range_stop_snapshot.py
range_var_materialize.py
readonly_default.py
reduce_over_iterable.py
remove_affix.py
repr_builtin.py
repr_control_escape.py
return_alias_allowed.py
return_alias_reject.py
return_nested_fn.py
reversed_builtin.py
reversed_range.py
reversed_str.py
rfind_index_startend.py
right_shift_large_amount.py
round_builtin.py
round_digits.py
round_huge_negative_ndigits.py
round_int_digits.py
round_nonfinite.py
rust_keyword_idents.py
self_field_alias_reject.py
self_field_mutators.py
seq_repeat.py
set_add.py
set_bool_membership.py
set_comp.py
set_ctor_str_tuple.py
set_dict_comp_expr.py
set_dict_mutators.py
set_first.py
set_from_list.py
set_methods.py
set_ops.py
set_predicates.py
set_predicates_no_move.py
set_remove.py
set_spread.py
set_update_str_tuple.py
setdefault_append.py
setdefault_self_default.py
sets.py
shared_inner_row_reject.py
short_circuit_chain.py
short_circuit_operand.py
sibling_nested_loop_var.py
sign.py
single_elem_tuple_unpack.py
slice_assign.py
slice_reverse.py
slice_step.py
slicing.py
sort_float_key.py
sort_float_tuple.py
sort_inplace_key.py
sort_inplace_reverse.py
sort_key_fn.py
sort_key_tuple_index.py
sorted_builtin.py
sorted_dict.py
sorted_float.py
sorted_float_nan.py
sorted_key.py
sorted_reverse.py
sorted_str.py
split_c0_separators.py
split_empty_sep.py
split_none_sep.py
split_whitespace.py
squares_list.py
star_unpack_defaults_deferred.py
star_unpack_fixed_call.py
starred_unpack.py
statement_try_except.py
staticmethod_instance_via_class_rejected.py
str_accum_locals.py
str_alias_branch.py
str_as_iterable.py
str_capitalize.py
str_case_predicates.py
str_char_at.py
str_char_semantics.py
str_contains.py
str_control_byte_escape.py
str_dataclass.py
str_find_char_index.py
str_find_count_startend.py
str_format.py
str_format_float_default.py
str_format_kwargs.py
str_index.py
str_index_clone.py
str_index_oob.py
str_isascii.py
str_isnumeric.py
str_iter.py
str_just.py
str_ljust_fill_reuse.py
str_method_move_receiver.py
str_methods.py
str_methods_more.py
str_of_bool.py
str_of_float.py
str_of_int.py
str_of_optional.py
str_of_str_identity.py
str_pad_fill.py
str_parse.py
str_partition.py
str_predicates.py
str_print_list_tuple.py
str_range.py
str_replace.py
str_replace_count.py
str_reverse_slice.py
str_rfind.py
str_rsplit_maxsplit.py
str_slice_char.py
str_split_maxsplit.py
str_splitlines.py
str_startswith_tuple.py
str_stepped_slice.py
str_strip_charset.py
str_title.py
str_width_format.py
str_width_negative.py
strformat_float_align.py
string_forward_ref_annotation.py
struct_factory.py
struct_minmax_partialcmp.py
struct_mutator_names.py
struct_partialord_sort.py
struct_pick_alias.py
subprocess_demo.py
subscript_append.py
subscript_assign_bounds.py
subscript_list_concat_aug.py
subscript_swap.py
sum_builtin.py
sum_float_inf.py
sum_list.py
sum_start.py
sum_start_promote.py
sum_to.py
swapcase.py
ternary_builtin.py
ternary_launder_reject.py
ternary_mixed_float_int.py
ternary_optional_narrow.py
title_titlecase.py
titlecase_digraphs.py
trait_determinism_demo.py
true_division.py
truthiness_comp_assert.py
try_arg_clone.py
try_assign_bound_exc.py
try_except.py
try_except_assign.py
try_finally.py
try_finally_only.py
tuple_aggregate.py
tuple_call_rejected.py
tuple_concat.py
tuple_contract.py
tuple_diff_arity_cmp.py
tuple_except_typed.py
tuple_fstring_repr.py
tuple_index.py
tuple_membership.py
tuple_negative_index.py
tuple_reassign_loop.py
tuple_repeat_literal.py
tuple_target_loop_leak.py
tuple_unpack.py
tuple_unpack_arity3.py
tuple_unpack_augment.py
tuple_var_repeat.py
tuples.py
type_bare_rejected.py
type_compare.py
typed.py
typed_except.py
typing_capitalized_generics.py
unary_dunder_dispatch.py
varargs.py
varargs_splat.py
variadic_minmax.py
void_fn.py
walrus_if.py
walrus_reassign_mut.py
with_open.py
word_count.py
writethrough_impure_index.py
xlate_lean_to_rust_demo.lean
xlate_py_list_demo.py
xlate_rust_fn_to_lean_thm_demo.rs
zeroarg_ctor.py
zfill.py
zip3.py
zip3_expr.py
zip_tuple_unpack_leak.py
1
2
3
def
f
(
)
->
int
:
fns
=
[
lambda
:
i
for
i
in
range
(
3
)
]
return
len
(
fns
)