Git Product home page Git Product logo

Comments (4)

stlankes avatar stlankes commented on June 8, 2024

Yeah, we have to describe it better. It exists sone environment variables to define the static network configuration. See https://github.com/hermit-os/kernel/blob/main/src/executor/device.rs#L95

from hermit-rs.

hugusmaximus avatar hugusmaximus commented on June 8, 2024

Sure, this is what I'm doing (and also disabling the dhcpv4 feature) but just wondered if this could be in a separated config file... It's fine, I can go ahead by modifying those variables you mention.

from hermit-rs.

stlankes avatar stlankes commented on June 8, 2024

Yes, we should do it. I will talk @mkroening about it.

from hermit-rs.

mkroening avatar mkroening commented on June 8, 2024

I'm not sure how easy that would be.

Where would we search for that file?

  • We could do it like Cargo does for .config/cargo.toml, but that depends on the current directory and I am not sure how well that composes with our build scripts.
  • We could put it into the kernel's source root, but that is not easily accessible when not developing the kernel locally.
  • We might want to put it next to the application being built, but that directory is not exposed to build scripts by cargo. Then, we could parse the file in the build script and set corresponding environment variables. This approach would translate very poorly to C applications, too.
  • We might want to put it in some Hermitfile describing the image, similar to a Dockerfile. That would be ideal, I think, but we don't have such a thing yet.

I think for the mean time, it would be easiest to work around this by setting up some shell script (maybe even a local alias for cargo), which would represent a self-built version of such a configuration file.

from hermit-rs.

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.