[workspace]
members = [
"rust", //实现rust版本的sdk和 examples
"worker" //用make编译libmediasoup-worker静态库
]
let rooms_registry = Data::new(RoomsRegistry::default());
HttpServer::new(move || {
App::new()
.app_data(worker_manager.clone())
.app_data(rooms_registry.clone())
.route("/ws", web::get().to(ws_index))
})
// 2 threads is plenty for this example, default is to have as many threads as CPU cores
.workers(2)
.bind("127.0.0.1:3000")?
.run()
.await