Repository navigation
Version 4.16.0
- Vastly organized files, dependencies, and code readability. Now the
hubcrate is much cleaner than before. If you already have an app using older Rinf versions, it is recommended to runrinf template --bridgeand addrinf = "4.16.0"toCargo.tomlof thehubcrate.
Now it's much cleaner to write code and add dependencies inside the hub crate. web_alias module was removed and is replaced with the tokio_with_wasm crate.
native/hub/Cargo.toml of 4.16.0:
[package]
# Do not change the name of this crate.
name = "hub"
version = "0.1.0"
edition = "2021"
[lib]
# `lib` is required for non-library targets,
# such as tests and benchmarks.
# `cdylib` is for Linux, Android, Windows, and web.
# `staticlib` is for iOS and macOS.
crate-type = ["lib", "cdylib", "staticlib"]
[dependencies]
rinf = "4.16.0"
tokio_with_wasm = "0.3.2"
wasm-bindgen = "0.2.87"
prost = "0.12.0"
sample_crate = { path = "../sample_crate" }native/hub/Cargo.toml of 4.15.2:
[package]
# Do not change the name of this crate.
name = "hub"
version = "0.1.0"
edition = "2021"
[lib]
# `lib` is required for non-library targets,
# such as tests and benchmarks.
# `cdylib` is for Linux, Android, Windows, and web.
# `staticlib` is for iOS and macOS.
crate-type = ["lib", "cdylib", "staticlib"]
# These are dependencies for non-web platforms.
[target.'cfg(not(target_family = "wasm"))'.dependencies]
libc = "0.2"
dart-sys = { version = "4.0.2" }
allo-isolate = { version = "0.1.20", features = ["zero-copy"] }
tokio = { version = "1.28.2", features = ["rt-multi-thread", "time"] }
os-thread-local = "0.1.3"
backtrace = "0.3.69"
# These are dependencies for the web.
[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen = { version = "0.2.87" }
wasm-bindgen-futures = "0.4.37"
js-sys = "0.3.64"
web-sys = { version = "0.3.64", features = [
"DedicatedWorkerGlobalScope",
"MessagePort",
"Blob",
"BlobPropertyBag",
"Worker",
"Url",
"BroadcastChannel",
] }
async_wasm_task = "0.2.3"
[dependencies]
bytemuck = "1.11.0"
lazy_static = "1.4.0"
tokio = { version = "1.28.2", features = ["sync", "macros"] }
prost = "0.12.0"
sample_crate = { path = "../sample_crate" }