We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
看起来文中引用了 zcore 目录下的代码,而随着教程的更新,刚写出时被引用的代码之后一定有一些会被改变。例如现在的教程中引用zcore/src/object/object_v1.rs,我想之后还会有object_v2,object_async.rs, object.rs吧。于是要么会有dead_code,要么代码全部写在文中从而无法作为一个rust项目运行,这是个问题。
zcore/src/object/object_v1.rs
object_v2
object_async.rs
object.rs
我觉得blog_os 的写作方式值得借鉴:
The text was updated successfully, but these errors were encountered:
我之前是参考 Rust Book 的方式来写的:代码和文档放在一起方便直接引用。但还没想清楚各个版本的代码该如何组织,可能是以章为单位,把整章完成后的代码放在一个文件夹中。
我觉得 blog_os 的写作方式值得借鉴: 每篇文章放在一个分支上,代码需要更新时只需要更新相应分支; 临时代码直接写在文章里,确定不需要改变的代码引用相应分支中的代码。
我觉得 blog_os 的写作方式值得借鉴:
我觉得这样可以,但 mdbook 是否可以引用其它分支的代码?
Sorry, something went wrong.
可以用git worktree命令把不同分支的文档checkout到一个文件夹下,修改设置它为mdbook build的文件夹,然后mdbook build。同时CI脚本也要改一下。
mdbook build
OK,可以试试!
No branches or pull requests
看起来文中引用了 zcore 目录下的代码,而随着教程的更新,刚写出时被引用的代码之后一定有一些会被改变。例如现在的教程中引用
zcore/src/object/object_v1.rs
,我想之后还会有object_v2
,object_async.rs
,object.rs
吧。于是要么会有dead_code,要么代码全部写在文中从而无法作为一个rust项目运行,这是个问题。我觉得blog_os 的写作方式值得借鉴:
The text was updated successfully, but these errors were encountered: