crust
C99 (toy) compiler toolchain in Rust (in a weekend, for fun and self-education)
File Explorer
Download Latest Version (.zip)- bench_cpp.rs
- bench_lexer.rs
- bench_parser.rs
- bubble_sort.c
- hello_crust.c
- input_data_array.c
- input_data_sort.c
- simple_print.c
- ast.rs
- cpp.rs
- gen.rs
- lexer.rs
- lib.rs
- main.rs
- parser.rs
- sema.rs
- symtable.rs
- missing_paren.c
- no_brace.c
- no_semicolon.c
- wrong_case.c
- header_1.h
- comment_1.c
- header1.c
- header1.h
- header2.h
- header3.h
- header4.h
- header5.h
- macro_func.c
- macro_object.c
- macro_object_2.c
- redefined.c
- trash.c
- tri_1.c
- tri_2.c
- tri_3.c
- generic_1.c
- add.c
- and_false.c
- and_true.c
- assign.c
- assign_ternary.c
- assign_val.c
- associativity.c
- associativity_2.c
- associativity_3.c
- associativity_4.c
- associativity_5.c
- bitwise.c
- bitwise_zero.c
- break.c
- bubble_sort.c
- combine.c
- combine_2.c
- combine_3.c
- combine_4.c
- complicated_exp.c
- consecutive_blocks.c
- consecutive_declarations.c
- continue.c
- continue_empty_post.c
- decl_1.c
- declare_after_block.c
- declare_block.c
- declare_late.c
- div.c
- do_while.c
- else.c
- empty_expression.c
- eq_false.c
- eq_true.c
- exp_return_val.c
- expression_args.c
- fib.c
- for.c
- for_decl.c
- for_empty.c
- for_nested_scope.c
- for_variable_shadow.c
- fun.c
- fun_in_expr.c
- fun_shadowed_by_variable.c
- ge_false.c
- ge_true.c
- global.c
- global_array_1.c
- global_array_2.c
- global_array_3.c
- global_not_initialized.c
- global_shadowed.c
- gt_false.c
- gt_true.c
- if_nested.c
- if_nested_2.c
- if_nested_3.c
- if_nested_4.c
- if_nested_5.c
- if_not_taken.c
- if_taken.c
- initialize.c
- le_false.c
- le_true.c
- lt_false.c
- lt_true.c
- missing_return.c
- mult.c
- multi_arg.c
- multi_arg_1.c
- multi_arg_2.c
- multi_digit.c
- multi_nesting.c
- multi_return.c
- multiple_global.c
- multiple_if.c
- multiple_ternary.c
- multiple_vars.c
- mutual_recursion.c
- ne_false.c
- ne_true.c
- neg.c
- nested_break.c
- nested_break_2.c
- nested_break_3.c
- nested_for.c
- nested_if.c
- nested_ops.c
- nested_ops_2.c
- nested_scope.c
- nested_scope_2.c
- nested_ternary.c
- nested_ternary_2.c
- nested_while.c
- nested_while_2.c
- nested_while_3.c
- new_precedence.c
- newlines.c
- no_arg.c
- no_initialize.c
- no_newlines.c
- not_five.c
- not_zero.c
- or_false.c
- or_true.c
- parens.c
- precedence.c
- precedence_2.c
- precedence_3.c
- precedence_4.c
- refer.c
- rename_function_param.c
- return_0.c
- return_2.c
- return_in_while.c
- rh_assignment.c
- single_arg.c
- spaces.c
- sub.c
- sub_neg.c
- ternary.c
- ternary_short_circuit.c
- ternary_short_circuit_2.c
- unop_add.c
- unop_parens.c
- unused_exp.c
- variable_as_arg.c
- while_multi_statement.c
- while_single_statement.c
- .gitignore
- .travis.yml
- bors.toml
- Cargo.lock
- Cargo.toml
- LICENSE
- README.md
- test.sh
- test_dev.sh
# Installation Guide
1. Get the code
git clone https://github.com/onehr/crust
Downloads the entire project code from GitHub to your computer.
cd crust
Moves into the project folder you just downloaded.
2. Rust
Medium RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Rust (rustup) Installing via rustup also installs cargo.
cargo build --release
Compiles the Rust project.
cargo run
Builds and then immediately runs the program.
If cargo build finishes without errors, it worked. The executable is created under target/.
// repository documentation
Was this content helpful?
(0 ratings)
