Code Monkey home page Code Monkey logo

Comments (7)

alessio-proietti avatar alessio-proietti commented on May 13, 2024

I had to comment out

[target.'cfg(target_os = "hermit")'.dependencies.hermit-sys]
version = "0.1.*"
#default-features = false
features = ["smoltcp"]

And now it seems to run without falling into exception....
Is it meaningful ? @stlankes

If it is ok I can update the documentation beyond what I did there #119.
What is going on?

[0][INFO] Network driver successfully initalized virtqueues.
[0][INFO] Device specific initalization for Virtio network defice 1041 finished
[0][INFO] Network device with id 1041, has been initalized by driver!
[0][INFO] Virtio-net link is up after initalization.
[0][INFO] Virtio network driver initalized with Virtio network device.
[0][INFO] Install virtio interrupt handler at line 11
[INFO] Spawn network thread with id 2
[INFO] MAC address 52-54-00-12-34-56
[INFO] Configure network interface with address 10.0.5.100/24
[INFO] Configure gateway with address 10.0.5.1
[INFO] MTU: 1500 bytes
Hello World!
[0][INFO] Number of interrupts
[0][INFO] [0][7]: 3
[0][INFO] Shutting down system

from hermit-rs.

stlankes avatar stlankes commented on May 13, 2024

Sorry, some times I don't get email about new issues.

Do you solve this issue? I can write a small tutorial to describe the setup.

from hermit-rs.

alessio-proietti avatar alessio-proietti commented on May 13, 2024

It could be very useful having a tutorial, If I can help lmk

Anyway No, the issue is not resolved as of now. FUrthermore, Now with latest version and same build I Have another error, this:

[0][INFO] Feature set wanted by network driver are in conformance with specification.
[0][ERROR] Device features set, does not satisfy minimal features needed. Aborting!
[0][ERROR] Virtio networkd driver could not be initialized with device: 1041
[INFO] Spawn network thread with id 2
[WARN] Ethernet interface not available
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: Other, message: "accept failed" }', src/main.rs:12:29
[0][INFO] Number of interrupts
[0][INFO] [0][7]: 3
[0][INFO] Shutting down system

for the code:

#[cfg(target_os = "hermit")]
extern crate hermit_sys;

use std::net::TcpListener;

fn main() {
let listener = TcpListener::bind("0.0.0.0:7878").unwrap();

for stream in listener.incoming() {
    let stream = stream.unwrap();
    println!("Connection established!");
}

}

from hermit-rs.

stlankes avatar stlankes commented on May 13, 2024

Sorry, I oversaw it. We revise the network interface. But a tutorial is still missing. I will do it. Do you test our httpd example?

from hermit-rs.

alessio-proietti avatar alessio-proietti commented on May 13, 2024

Yes, it doesn't work for me:

thread '<unnamed>' panicked at 'called Result::unwrap()on anErr value: "Network is not initialized!"', /home/<MYUSERDIR>/.cargo/registry/src/github.com-1ecc6299db9ec823/hermit-sys-0.1.23/src/net/mod.rs:177:14

from hermit-rs.

stlankes avatar stlankes commented on May 13, 2024

You are using Qemu and initialized a Tap device?

from hermit-rs.

alessio-proietti avatar alessio-proietti commented on May 13, 2024

yes

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.