Giter Club home page Giter Club logo

Comments (8)

secana avatar secana commented on June 5, 2024 2

Enabled in latest release.

from kellnr.

secana avatar secana commented on June 5, 2024 1

Hi @snaggen, thank you for reporting that. Yes, a.t.m only the default feature is build. I'll keep this as the first feature request for kellnr.

from kellnr.

syphar avatar syphar commented on June 5, 2024

I'm excited to see kellnr come to life, and also see it including docs :)

My 2c about this:
I believe that over time, the doc-build will at least partially have to replicate docs.rs functionality.

Probably incomplete examples, from the top of my head, would include:

  • this request here (docs.rs metadata),
  • crates-build-env for needed c-libraries for your dependencies.
  • build inside a countainer (probably with rustwide for security (while you probably don't have to care about the source / build-script for your own private packages, you are executing build.rs files locally for each dependency they include, which might leak the private source code of your own packages).

My recommendation would be to "librarify" the needed parts of the docs.rs codebase, and use these here in kellnr. Alternatively perhaps run actual docs.rs next to kellnr.

I'm happy to review / discuss any PR to librarify docs.rs, or help with self-hosting (it's not fully documented yet).

( for reference: I'm part of the docs.rs team )

from kellnr.

secana avatar secana commented on June 5, 2024

Hi @syphar,

when I build the doc.rs hosting in Kellnr I wanted the most simple solution that works out of the box. For the future, a more sophisticated approach is needed and I don't intend to re-invent the wheel. Using parts of docs.rs in Kellnr would be super cool and keep the docs ecosystem from fragmentation.

If you are interested, a docs.rs + kellnr joint venture would be awesome :)

from kellnr.

syphar avatar syphar commented on June 5, 2024

when I build the doc.rs hosting in Kellnr I wanted the most simple solution that works out of the box. For the future, a more sophisticated approach is needed and I don't intend to re-invent the wheel. Using parts of docs.rs in Kellnr would be super cool and keep the docs ecosystem from fragmentation.

This sounds like a good plan. But keep in mind: there are security implications of the current implementation. As a company, I would want to know this before using kellnr.

If you are interested, a docs.rs + kellnr joint venture would be awesome :)

As many projects we have limited capacity, so our topics are different ones right now. But as described, I'm happy to discuss any design / ideas, and review PRs 😃 .

from kellnr.

secana avatar secana commented on June 5, 2024

There is already a big disclaimer in the docs that building docs is basically arbitrary code execution like on any build server.

I would go with multiple steps to incorporate parts from docs.rs.

  1. Replace the raw "rustdoc" call from Kellnr with a library from docs.rs which handles different features and configs for docs.rs
  2. Allow Kellnr to switch from a local Rust install to the usage of Docker or something more secure
  3. Allow custom build steps (not sure if that is needed), e.g. install native libraries or something else that is not handled by a simple "rustdoc" call

What do you think about that? The first step should be straight forward, if you can provide a library which takes the docs.rs specific config from the Cargo.toml and builds the docs.

from kellnr.

syphar avatar syphar commented on June 5, 2024

There is already a big disclaimer in the docs that building docs is basically arbitrary code execution like on any build server.

I missed that one, sorry about that.

I would go with multiple steps to incorporate parts from docs.rs.

1. Replace the raw "rustdoc" call from Kellnr with a library from docs.rs which handles different features and configs for docs.rs

2. Allow Kellnr to switch from a local Rust install to the usage of Docker or something more secure

sounds good

3. Allow custom build steps (not sure if that is needed), e.g. install native libraries or something else that is not handled by a simple "rustdoc" call

The docs.rs strategy for this will be rust-lang/docs.rs#315 (the crate can provide a custom docker image to build with).

What do you think about that? The first step should be straight forward, if you can provide a library which takes the docs.rs specific config from the Cargo.toml and builds the docs.

I'm happy to review any PR to docs.rs that does this, or answer any questions.

from kellnr.

snaggen avatar snaggen commented on June 5, 2024

I wonder if it would be possible to maybe default to 'all-features' (or add a flag for it) in the short term, since the larger rustdoc rewrite sounds lika a larger thing.

from kellnr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.