Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liov committed Nov 26, 2024
1 parent 4aea1c2 commit 0c8c48e
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 47 deletions.
2 changes: 1 addition & 1 deletion awesome
2 changes: 1 addition & 1 deletion server/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ opt-level = 3

[workspace]
members = [
"cdylib",
"mobile", "rfv",
"wasm"
]
31 changes: 0 additions & 31 deletions server/rust/cdylib/Cargo.toml

This file was deleted.

31 changes: 31 additions & 0 deletions server/rust/mobile/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[package]
name = "mobile"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[target.'cfg(target_os="android")'.dependencies]
android_logger = "0.14.1"

[lib]
name = "mobile"
crate-type = ["lib", "staticlib", "cdylib"]

[dependencies]
libc = "0.2"
axum = "0.7.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.73"
futures = "0.3.17"
tracing = "0.1.29"
tracing-subscriber = "0.3"
tokio = { version = "1.19", features = ["full"] }
slog = "2.7"
slog-stdlog = "4.1"
slog-scope = "4.4"
slog-term = "2.8"
slog-async = "2.7"
lazy_static = "1.4"
once_cell = "1.9"
log = "0.4"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lazy_static! {
let drain = slog_term::FullFormat::new(decorator).build().fuse();
let drain = slog_async::Async::new(drain).build().fuse();

slog::Logger::root(drain, o!())
Logger::root(drain, o!())
};
}

Expand Down Expand Up @@ -90,12 +90,10 @@ pub async fn start(port: u16) {

// run our app with hyper
// `axum::Server` is a re-export of `hyper::Server`
let addr = SocketAddr::from(([127, 0, 0, 1], port));
let addr = format!("0.0.0.0:{port}");
info!("listening on {}", addr);
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
let listener =tokio::net::TcpListener::bind(addr).await.unwrap();
axum::serve(listener, app).await.unwrap();;
}

// basic handler that responds with a static string
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rust::export::start;
use mobile::export::start;


fn main() {
Expand Down
14 changes: 14 additions & 0 deletions server/rust/rfv/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use axum::{
routing::get,
Router,
};

#[tokio::main]
async fn main() {
// build our application with a single route
let app = Router::new().route("/", get(|| async { "Hello, World!" }));

// run our app with hyper, listening globally on port 3000
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
axum::serve(listener, app).await.unwrap();
}
2 changes: 1 addition & 1 deletion server/rust/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ console_error_panic_hook = { version = "0.1.7", optional = true }
# allocator, however.
wee_alloc = { version = "0.4.5", optional = true }

fixedbitset = "0.4.2"
fixedbitset = "0.5"
js-sys = "0.3.60"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/initialize
Submodule initialize updated 62 files
+6 −0 _example/confdao/confdao.go
+6 −0 _example/main.go
+6 −0 basic_config.go
+6 −0 builtin_config.go
+6 −0 conf_center/apollo/apollo.go
+6 −0 conf_center/conf_center.go
+6 −0 conf_center/etcd/etcd.go
+6 −0 conf_center/http/http.go
+6 −0 conf_center/local/loacl.go
+6 −0 conf_center/nacos/nacos.go
+6 −0 conf_dao/apollo/apollo.go
+6 −0 conf_dao/badger/badger.go
+6 −0 conf_dao/buntdb/buntdb.go
+6 −0 conf_dao/dao_field.go
+6 −0 conf_dao/duckdb/duckdb.go
+6 −0 conf_dao/duckdb/duckdb_test.go
+6 −0 conf_dao/elastic/v7/elastic.go
+6 −0 conf_dao/elasticsearch/v7/elasticsearch.go
+6 −0 conf_dao/elasticsearch/v8/elasticsearch.go
+6 −0 conf_dao/etcd/etcd.go
+6 −0 conf_dao/flightsql/flightsql.go
+6 −0 conf_dao/gormdb/common/common.go
+6 −0 conf_dao/gormdb/gorm.go
+6 −0 conf_dao/gormdb/mysql/db.go
+6 −0 conf_dao/gormdb/postgres/db.go
+6 −0 conf_dao/gormdb/sqlite/db.go
+6 −0 conf_dao/groupcache/groupcache.go
+6 −0 conf_dao/grpc/client.go
+6 −0 conf_dao/influxdb/influxdb.go
+6 −0 conf_dao/kafka/consumer.go
+6 −0 conf_dao/kafka/kafka.go
+6 −0 conf_dao/kafka/producer.go
+6 −0 conf_dao/log/log.go
+6 −0 conf_dao/loki/client.go
+6 −0 conf_dao/mail/mail.go
+6 −0 conf_dao/mqtt/mqtt.go
+6 −0 conf_dao/mqtt/mqtt_test.go
+6 −0 conf_dao/nacos/nacos.go
+6 −0 conf_dao/nats/client/client.go
+6 −0 conf_dao/nats/server/server.go
+6 −0 conf_dao/nsq/consumer.go
+6 −0 conf_dao/nsq/producer.go
+6 −0 conf_dao/pebble/pebble.go
+6 −0 conf_dao/redis/redis.go
+6 −0 conf_dao/ristretto/cache.go
+6 −0 conf_dao/rocksdb/rocksdb.go
+6 −0 conf_dao/rocksdb/rocksdb_test.go
+6 −0 conf_dao/template.go
+6 −0 conf_dao/viper/viper.go
+6 −0 config_template.go
+6 −0 config_template_test.go
+6 −0 encoding.go
+6 −0 env_config.go
+6 −0 global_config.go
+1 −1 go.mod
+2 −0 go.sum
+6 −0 inject.go
+6 −0 rootconf/rootconf.go
+6 −0 settings_flag.go
+6 −0 tag.go
+6 −0 tools/gen_config_template/main.go
+6 −0 type.go
2 changes: 1 addition & 1 deletion thirdparty/protobuf

0 comments on commit 0c8c48e

Please sign in to comment.