Coder Social home page Coder Social logo

no `serve` in the root about viz HOT 9 CLOSED

Baiyuetribe avatar Baiyuetribe commented on August 20, 2024
no `serve` in the root

from viz.

Comments (9)

Baiyuetribe avatar Baiyuetribe commented on August 20, 2024 2

yes, it only works with the main branch.
but if you use cargo add viz in your own project. it faild. looking forward to v0.5.x release

from viz.

fundon avatar fundon commented on August 20, 2024 1

@Baiyuetribe

See specifying-dependencies-from-git-repositories

[dependencies]
viz  = { git = "https://github.com/viz-rs/viz.git", branch = "main" }

or

[dependencies]
viz  = { git = "https://github.com/viz-rs/viz.git", rev = "0a0a7f7" }

from viz.

Baiyuetribe avatar Baiyuetribe commented on August 20, 2024
    if let Err(err) = Server::bind(&addr).serve(ServiceMaker::from(app)).await {
        println!("{err}");
    }

I also found this works, is it equal to the implementation above?

from viz.

fundon avatar fundon commented on August 20, 2024

I also found this works, is it equal to the implementation above?

No, viz::serve is not landed in v0.4.x branch.

v0.5 will be released this week, so we can use that.

from viz.

Baiyuetribe avatar Baiyuetribe commented on August 20, 2024

is v0.4.x can not use State? i test some state,like
image

missing state type `alloc::sync::Arc<std::sync::mutex::Mutex<alloc::vec::Vec<leaf::router::Todo>>>`

same issue with sea_orm
image

missing state type `sea_orm::database::db_connection::DatabaseConnection`

from viz.

fundon avatar fundon commented on August 20, 2024

The sea_orm example was added into main, and the main branch is v0.5.x.

I checked it. The todos example works ok.

git switch 0.4.x
cd examples
cargo run --bin todos -- --nocapture

BTW, it also works fine in main branch.

from viz.

fundon avatar fundon commented on August 20, 2024

Maybe you need to add those, add an alias.

/// In-memory todo store
type DB = Arc<Mutex<Vec<Todo>>>;

from viz.

Baiyuetribe avatar Baiyuetribe commented on August 20, 2024

@fundon How can I use 0.5.x in my project now without cloning the entire project? I can't wait for the release of .5.x.

from viz.

fundon avatar fundon commented on August 20, 2024

0.5.0 is released.

from viz.

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.