KCL: Rust 在编译器领域的实践与探索## RUST CHINA CONF 2023 第三届中国Rust开发者大会 6.17-6.18 @Shanghai ## KCL: Rust 在编译器领域的实践与探索 张正 蚂蚁集团 ## 😍 01 KusionStack 与 KCL 02 用 Rust 重写 KCL 03 Rust 重写后的收益 04 更多的探索 ## 01 KusionStack 与 KCL ## KusionStack是什么 kcl-format kcl-lint kcl-test kc1-doc ## 02 用 Rust 重写 KCL ## 我从前跟别人谈论Rust  我现在跟别人谈论Rust  ## 2 KCL 编译器架构升级 Python 代码翻译 Source Code Python code 栈式虚拟机 Source Code AST Bit code VM Rust 编译器 Source Code AST LLVM IR Native/WASM ## R ## 我们遇到了哪些问题?0 码力 | 25 页 | 3.50 MB | 2 年前3
2.1.5 Go语言编译器简介中国 上海 / 2020-11.21-22 Go语言编译器简介 ’ alt=‘OCR图片’/> 关于我 Contributors to golang/go · GitHub 给Go编译器提交过127个补丁,累计六万余行; 拥有Go官方git仓库提交权限; 全球贡献者排名长期处于前50名; 世界上90%的gopher都用过我写的代码; 编译器的重要性 只有1%的程序员懂汇编语言 汇编语言无法构建大型系统 汇编语言无法构建大型系统 操作系统内核也需要编译器才能运行起来 编译理论是图灵奖大户,仅次于计算复杂度理论 操作系统有后门,编译器的后门更致命 编译器的难题:任务爆炸 N种语言 * M种机器 = N*M 个任务 GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 两个方案 $$ N \mathrm {种 语 言} + M \mathrm {种 机 器} = {个 任 务} $$ 其它语言 -> C -> 各个机器 各个语言 -> x86 -> 其它机器 GOPHER CHINA 2020 中国 上海 / 2020-11.21-22 通用(非专用)编译器的方案 AST = Abstract Syntax Tree抽象语法树 SSA = Single Static Assignment单静态赋值 IR = Intermediate Representation中间表示0 码力 | 36 页 | 1.63 MB | 1 月前3
Concurrency in RustConcurrency in Rust Alex Crichton ## What's Rust? Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. ## Concurrency? Rust? Libraries • Deadlocks • Use after free Exploitable! • Double free Concurrency? Rust? Libraries Futures ## What's Rust? Rust is a systems programming language that runs blazingly fast, prevents segfaults auto& elem = vector[0]; vector.push_back(some_string); cout << elem; } ## Rust's Solution Ownership/Borrowing  Martin Geisler ## Contents Welcome to Comprehensive Rust 👑👑 1 Running the Course 13 1.1 Course 2.1 The Rust Ecosystem 18 2.2 Code Samples in This Training 19 2.3 Running Code Locally with Cargo 20 I Day 1: Morning 22 3 Welcome to Day 1 23 4 Hello, World 25 4.1 What is Rust? 25 4.2 2 Benefits of Rust 26 4.3 Playground 26 5 Types and Values 28 5.1 Hello, World 28 5.2 Variables 29 5.3 Values 29 5.4 Arithmetic 30 5.5 Type Inference 30 5.6 Exercise: Fibonacci 31 5.60 码力 | 378 页 | 1009.46 KB | 2 年前3
Comprehensive RustComprehensive Rust  Martin Geisler ## 차례 Comprehensive Rust 에 오신 것을 환영합니다 👑 1 강의전행 12 1.1 강의구성 13 1.2 단축키 15 1 강의에서의 코드샘플 18 2.3 로컬 환경의카고 19 I 1 일차 오전 20 3 1 일차개요 21 4 Hello World! 23 4.1 러스트란? 23 4.2 Rust 의이점 23 4.3 플레이그라운드 24 5 타입 및값 26 5.1 Hello World! 26 5.2 변수 27 5.3 값 27 5.4 연산 28 5 30.6 안전하지 않은 트레잇구현하기 182 30.7 FFI 래퍼 183 30.7.1 해답 185 IX 안드로이드 189 31 Welcome to Rust in Android 190 32 설치 191 33 빌드규칙 192 33.1 러스트라이너리 193 33.2 러스트라이브러리 193 34 AIDL0 码力 | 368 页 | 1.29 MB | 1 年前3
2021-11-22 - Rust CTCFT - Rust for Linux## Rust for Linux Miguel Ojeda Wedson Almeida Filho Alex Gaynor ## I ntroduction Rust for Linux aims to add Rust support to the Linux kernel. We believe Rust offers key improvements over C in this domain in the improvement of Rust for everyone! Language Library Tooling ## Nightly features A general priority is to stabilize them (or to find alternatives): https://github.com/Rust-for-Linux/linux/issues/2 } } ## Memory model: future potential Unified/Compatible Linux kernel and Rust memory models: No need to use inline assembly to define a new memory model. Language-supported address0 码力 | 53 页 | 332.50 KB | 1 年前3
RUST AS A CASE STUDY## BENEFITS AND DRAWBACKS OF ADOPTING A SECURE PROGRAMMING LANGUAGE: RUST AS A CASE STUDY Kelsey Fulton, Anna Chan, Daniel Votipka, Michelle Mazurek, Michael Hicks # Memory safety vulnerabilities remain https://www.zdnet.com/article/chrome-70-of-all-security-bugs-are-memory-safety-issues/ ## Case Study: Rust ■ Attempt safety and performance (e.g., no GC) ☑ Useful where C/C++ are hardest to replace What language? ## Case Study: Rust ■ Semi-structured interview with senior developers (I = 16) ☑ Survey with Rust community (S = 178) ## Learning Rust ☑ Rust is hard to learn. ### Rust has “a near-vertical learning0 码力 | 19 页 | 3.37 MB | 2 年前3
Real world Rust
- Why and how we use Rust in TiKVReal world Rust Why and how we use Rust in TiKV 黄东旭 PingCAP 技术架构未来 thegiac.com ## 关于我 ● 黄东旭 Dongxu_Huang • Open source hacker / Infrastructure Engineer • MSRA / Netease / Wandoujia / PingCAP CTO PingCAP • Codis / TiDB / TiKV • Go / Python / Rust ...  ## What's Rust • Yet another system programming language o Alternative to C/C++  ## Why Rust? ## • Safe ○ Thread safety guarantee ☐ Segfaults free ## • Blazingly fast ☐ Ilvm backend ☐ No0 码力 | 29 页 | 506.53 KB | 2 年前3
Comprehensive Rust(Ukrainian) 202412Comprehensive Rust  Martin Geisler ## 3 MICT Ласкаво просимо в Comprehensive Rust 11 1 Проведения курсу 13 1.1 Структура Екосистема Rust 19 2.2 Приклади коду в цьому курсі 21 2.3 Запуск коду локально за допомогою Cargo 21 I День 1: Ранок 23 3 Ласкаво просимо до Дня 1 24 4 Hello World! 26 4.1 Що таке Rust? 26 26 4.2 Переваги Rust 27 4.3 Ігровий майданчик 27 5 Типи та значення 29 5.1 Hello World! 29 5.2 Змінні 30 5.3 Значення 30 5.4 Арифметика 31 5.5 Виведення типів 31 5.6 Вправа: Фібоначчі0 码力 | 396 页 | 1.08 MB | 1 年前3
Comprehensive Rust(Persian ) 202412👶 Comprehensive Rust Martin Geisler ## □□□□□ □□□□□ 11 Comprehensive Rust 38 6.4.1 39 6.5 39 6.6 40 6.7 42 6.7.1 43 6.7 44 7 45 8 46 8.2 47 8.3 47 8.4 47 8.5 49 8.5.1 269 270 271 272 273 274 275 276 277 278 279 280 281 Chromium C++ ☐ Rust Code ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ ☐ 281 probe-rs and cargo-embed 51.7 282 (Debugging) 51.7.1 282 51.8 284 52 284 Bare Metal Rust 52.1 286 52.2 290 :Bare Metal ☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐☐0 码力 | 393 页 | 987.97 KB | 1 年前3
共 707 条
- 1
- 2
- 3
- 4
- 5
- 6
- 71
相关搜索词
KCLRustKusionStack编译器LLVM IRGo编译器编译器工作流程ARM64硬件除法器词法分析Concurrency in RustConcurrencyData RacesFuturesCargo类型系统变量和值控制流内存安全所有权并发PlaygroundRust for Linuxconst 支持并发模型测试框架学习曲线文档社区支持TiKVRocksDBRaft性能ACID事务MVCC架构Comprehensive Rustбезпечний Rustнебезпечний Rustодночасність виконанняconcurrencythreaderror handlingsafety













