知识卡片
Rust先编译后运行
Rust 可在运行前把源代码编成二进制。接收方通常无需安装 Rust 编译器,但二进制仍须适配其平台和运行依赖。分别执行编译和启动,可以区分编译或链接问题与程序退出错误。
相关卡片 [[Cargo统一工程入口]]
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 入门 Hello, World! · 查看原书依据
If you’re more familiar with a dynamic language, such as Ruby, Python, or JavaScript, you might not be used to compiling and running a program as separate steps. Rust is an ahead-of-time compiled language, meaning you can compile a program and give the executable to someone else, and they can run it even without having Rust installed.
参考来源
- 位置:《The Rust Programming Language(第2版)》第01章 入门(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c01.xhtml`,块 0100)
- 结论依据:原文解释预先编译并比较交付二进制与源文件的环境要求。
- 原始内容:If you’re more familiar with a dynamic language, such as Ruby, Python, or JavaScript, you might not be used to compiling and running a program as separate steps. Rust is an ahead-of-time compiled language, meaning you can compile a program and give the executable to someone else, and they can run it even without having Rust installed.