Skip to content
New issue

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

How to build the documentation using cargo xbuild? #38

Closed
gnzlbg opened this issue Jul 2, 2019 · 8 comments · Fixed by #39
Closed

How to build the documentation using cargo xbuild? #38

gnzlbg opened this issue Jul 2, 2019 · 8 comments · Fixed by #39
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@gnzlbg
Copy link

gnzlbg commented Jul 2, 2019

I am using xargo doc to build documentation. What's the corresponding cargo-xbuild command for that ?

@phil-opp
Copy link
Member

phil-opp commented Jul 2, 2019

It doesn't exist yet since nobody needed it so far. But it should be relatively simple to add by creating a new binary in src/bin. Do you want to create a pull request?

@Nils-TUD
Copy link

Nils-TUD commented Jul 2, 2019

As an intermediate solution, you can also use the normal cargo doc for it:

export RUSTFLAGS="--sysroot <sysroot>"
export RUSTDOCFLAGS=$RUSTFLAGS
cargo doc --target <target>

@gnzlbg
Copy link
Author

gnzlbg commented Jul 2, 2019

Thanks, I'll stick to xargo for the time being - not sure when I'll have time to create a PR.

@phil-opp phil-opp added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 2, 2019
@phil-opp
Copy link
Member

phil-opp commented Jul 2, 2019

@gnzlbg Sure! Let's keep this issue open, maybe someone has time to implement it.

Aehmlo added a commit to Aehmlo/cargo-xbuild that referenced this issue Jul 8, 2019
Setting RUSTDOCFLAGS in addition to RUSTFLAGS causes rustdoc to use the
desired sysroot.

Closes rust-osdev#38.
@Aehmlo Aehmlo mentioned this issue Jul 8, 2019
phil-opp pushed a commit that referenced this issue Jul 9, 2019
Setting RUSTDOCFLAGS in addition to RUSTFLAGS causes rustdoc to use the
desired sysroot.

Closes #38.
@gnzlbg
Copy link
Author

gnzlbg commented Jul 9, 2019

@phil-opp wow thank you! I'll see if I can get libc using this instead of xargo. The work of migrating to cargo-xbuild is happening as part of: rust-lang/libc#1376

@phil-opp
Copy link
Member

phil-opp commented Jul 9, 2019

Thank @Aehmlo for that, I only pushed the merge button :D.

I'll see if I can get libc using this instead of xargo. The work of migrating to cargo-xbuild is happening as part of: rust-lang/libc#1376

Oh wow, I didn't expect that. Let me know if you have any problems!

@gnzlbg
Copy link
Author

gnzlbg commented Jul 9, 2019

Thank you @Aehmlo !

Let me know if you have any problems!

All green - it just worked.

@phil-opp
Copy link
Member

phil-opp commented Jul 9, 2019

Perfect, great to hear that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants