#how to eval code from args (std::env)

3 messages · Page 1 of 1 (latest)

kind jolt
#

if you just want a simple math expression evaluator, there are crates out there that let you pass in a string and return the evaluated result

but there's not really a way to evaluate rust code at runtime, unless you're willing to ship the whole compiler with your binary or rely on the user having rust installed on their system

tawdry dragon
#

if this is to just learn parsing and whatnot, then there are articles that explain this