engineer-man / piston

A high performance general purpose code execution engine.
https://emkc.org/run
MIT License
1.95k stars 252 forks source link

Add Rust #688

Closed MBA2022 closed 3 weeks ago

MBA2022 commented 2 months ago

1. Rustc (Rust Compiler)

Link: Rust Compiler (rustc)

Pros:

It’s the official compiler for Rust. Actively maintained and updated by the Rust development team. Produces highly optimized binaries. Excellent support for debugging and cargo integration (Rust's package manager). Cons: Compilation time can be slower compared to some other languages, especially for larger projects.

2. Mrustc (Minimal Rust Compiler)

Link: Mrustc

Pros:

Aims for compatibility with older Rust versions. Useful for bootstrapping and cross-compiling Rust. Cons: Lacks full feature support (e.g., no borrow checker, some language features not implemented). Not suitable for production code, mainly used as a proof-of-concept or backup compiler.

3. LLVM Backend for Rust (Rustc with LLVM)

Link: LLVM Project

Pros:

Utilizes LLVM’s powerful optimization features. Provides cross-platform compatibility. Cons: Heavier compilation process due to the extra LLVM layer. LLVM errors can be more complex and harder to debug.

4. Cargo (Rust Build System and Package Manager)

Link: Cargo

Pros:

Integrated with the rustc compiler. Provides easy dependency management and builds automation. Cons: Does not compile code directly; only manages the build process.

Joshix-1 commented 1 month ago

what's wrong with the existing rust package? https://github.com/engineer-man/piston/tree/master/packages/rust