Chemical calculator: Difference between revisions

m
m (rust example)
Line 3,886:
 
=={{header|Rust}}==
Rust is precompiled for execution, so it has not eval for arbitrary Rust code. The `eval` crate allows Rust to process syntax similar to JSON while executing.
This allows the example to run an `eval` on strings which have been first translated into numeric arithmetic.
<syntaxhighlight lang="rust">use regex::Regex;
use eval::{eval, to_value};
4,102

edits