Skip to content

Bump mio from 0.8.0 to 0.8.11 in /examples/crate_universe/vendor_remote_manifests #1

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 85 additions & 32 deletions examples/crate_universe/vendor_remote_manifests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 31 additions & 2 deletions rust/private/rustdoc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ def rustdoc_compile_action(
rustdoc_flags = rustdoc_flags + lints_info.rustdoc_lint_flags
lint_files = lint_files + lints_info.rustdoc_lint_files

# Collect HTML customization files
html_input_files = []
if hasattr(ctx.file, "html_in_header") and ctx.file.html_in_header:
html_input_files.append(ctx.file.html_in_header)
if hasattr(ctx.file, "html_before_content") and ctx.file.html_before_content:
html_input_files.append(ctx.file.html_before_content)
if hasattr(ctx.file, "html_after_content") and ctx.file.html_after_content:
html_input_files.append(ctx.file.html_after_content)
if hasattr(ctx.files, "markdown_css"):
html_input_files.extend(ctx.files.markdown_css)

cc_toolchain, feature_configuration = find_cc_toolchain(ctx)

dep_info, build_info, _ = collect_deps(
Expand Down Expand Up @@ -149,9 +160,12 @@ def rustdoc_compile_action(
if "OUT_DIR" in env:
env.update({"OUT_DIR": "${{pwd}}/{}".format(build_info.out_dir.short_path)})

# Create the combined inputs including HTML customization files
all_inputs = depset([crate_info.output], transitive = [compile_inputs, depset(html_input_files)])

return struct(
executable = ctx.executable._process_wrapper,
inputs = depset([crate_info.output], transitive = [compile_inputs]),
inputs = all_inputs,
env = env,
arguments = args.all,
tools = [toolchain.rust_doc],
Expand Down Expand Up @@ -205,6 +219,21 @@ def _rust_doc_impl(ctx):
"--extern",
"{}={}".format(crate_info.name, crate_info.output.path),
]

# Add HTML customization flags if attributes are provided
if ctx.attr.html_in_header:
rustdoc_flags.extend(["--html-in-header", ctx.file.html_in_header.path])

if ctx.attr.html_before_content:
rustdoc_flags.extend(["--html-before-content", ctx.file.html_before_content.path])

if ctx.attr.html_after_content:
rustdoc_flags.extend(["--html-after-content", ctx.file.html_after_content.path])

# Add markdown CSS files if provided
for css_file in ctx.files.markdown_css:
rustdoc_flags.extend(["--markdown-css", css_file.path])

rustdoc_flags.extend(ctx.attr.rustdoc_flags)

action = rustdoc_compile_action(
Expand Down Expand Up @@ -239,7 +268,7 @@ def _rust_doc_impl(ctx):
rustdoc_zip = depset([ctx.outputs.rust_doc_zip]),
),
]

rust_doc = rule(
doc = dedent("""\
Generates code documentation.
Expand Down