You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> :load fact
compiling fact.rs...
warning: missing crate link meta `name`, using `fact` as default
warning: missing crate link meta `vers`, using `0.0` as default
pushed .
crates loaded: fact
rusti> fact::factorial(12)
<anon>:5:12: 5:28 error: can't find crate for `fact`
<anon>:5 extern mod fact;
^~~~~~~~~~~~~~~~
task <unnamed> failed at 'explicit failure', /home/minh/Documents/Workplace/rust/rust/src/libsyntax/diagnostic.rs:69
rusti>
content of fact.rs
fnfactorial(n:uint) -> uint{letmut r = 1;for i inrange(2, n){
r *= i;}
r
}
After running the above section, a file named fact.o is created.
The text was updated successfully, but these errors were encountered:
when I manually compile fact.rs using rustc --lib fact.rs, resulting in a libfact-<hash>-0.0.so file, and then :load fact in rusti, rusti can find the library but it dumps core after I call fact::factorial(12)
output
WARNING: The Rust REPL is experimental and may be
unstable. If you encounter problems, please use the
compiler instead. Type :help for help.
rusti> :load fact
crates loaded: fact
rusti> fact::factorial(12)
[1] 8330 abort (core dumped) rusti
error log
content of
fact.rs
After running the above section, a file named
fact.o
is created.The text was updated successfully, but these errors were encountered: