Skip to content

otk-h/OpenOtkBrowser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenOtkBrowser

基于 Rust 程序设计语言的 toy browser,参考于 robinson

代码目的是学习 Rust 和 Browser 相关知识

HTML 解析和 DOM 树构建

使用 nom 库,自底向上解析

CSS 解析和 Styled 树构建

实现了一个简单的 css 词法分析器 lexical.rs
先解析 css 输入得到 StyleSheet,再构建 Styled 树,遍历 dom 树在 StyleSheet 中查找匹配的值

Layout 树构建

将 Styled-Tree 转换为 Layout-Tree,遍历 Styled-Tree,决定每个节点类型为 Block 或 Inline,然后进行 layout

渲染

使用 raqote 库、winit 库、pixels 库
vibe coding

网络

通过 URL 搜索并加载资源

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages