Skip to content

Commit

Permalink
Remove web packaging from stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
iduartgomez committed Sep 29, 2023
1 parent 5a8080f commit 21de9ef
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 125 deletions.
15 changes: 6 additions & 9 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "freenet-stdlib"
version = "0.0.6"
version = "0.0.7"
edition = "2021"
rust-version = "1.71.1"
publish = true
Expand All @@ -16,19 +16,17 @@ byteorder = "1"
blake3 = { version = "1", features = ["std", "traits-preview"] }
bs58 = "0.5"
chrono = { version = "0.4", default-features = false, features = ["alloc", "serde"] }
flatbuffers = "23.5.26"
futures = "0.3"
once_cell = "1"
semver = { version = "1.0.14", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_bytes = "0.11"
serde_json = "1"
serde_with = { version = "3", default-features = false, features = ["macros", "alloc"] }
tar = { version = "0.4.38", optional = true }
once_cell = "1"
thiserror = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["default", "env-filter"] }
xz2 = { version = "0.1", optional = true }
flatbuffers = "23.5.26"

# internal
freenet-macros = { path = "../rust-macros", version = "0.0.4" }
Expand Down Expand Up @@ -67,10 +65,9 @@ rand = { version = "0.8", features = ["small_rng"] }

[features]
default = []
archive = ["xz2", "tar"]
log = []
time = []
contract = ["time", "log"]
net = ["dep:tokio", "dep:tokio-tungstenite", "dep:wasm-bindgen", "dep:web-sys", "dep:js-sys", "dep:serde-wasm-bindgen"]
testing = ["arbitrary"]
trace = []
contract = ["time", "log"]
time = []
log = []
2 changes: 2 additions & 0 deletions rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ fn main() {
if let Err(err) = status {
println!("failed compiling flatbuffers schema: {err}");
println!("refer to https://github.com/google/flatbuffers to install the flatc compiler");
} else {
let _ = Command::new("cargo").arg("fmt").status();
}
}
6 changes: 3 additions & 3 deletions rust/src/delegate_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,9 @@ pub(crate) mod wasm_interface {
#[cfg(feature = "trace")]
{
tracing::trace!(
"sending result through FFI; addr: {ptr:p} ({}),\n serialized: {serialized:?}\n value: {value:?}",
ptr as i64
);
"sending result through FFI; addr: {ptr:p} ({}),\n serialized: {serialized:?}\n value: {value:?}",
ptr as i64
);
}
std::mem::forget(serialized);
Self {
Expand Down
2 changes: 0 additions & 2 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ pub mod log;
pub mod rand;
#[cfg(all(feature = "time", target_family = "wasm"))]
pub mod time;
#[cfg(feature = "archive")]
pub mod web;

/// Locutus stdlib prelude.
pub mod prelude {
Expand Down
111 changes: 0 additions & 111 deletions rust/src/web.rs

This file was deleted.

0 comments on commit 21de9ef

Please sign in to comment.