Skip to content

Commit ff8edb4

Browse files
committed
Remove cdylib
1 parent b0fb7db commit ff8edb4

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: keypair/Cargo.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ edition = { workspace = true }
1313
bs58 = { workspace = true, features = ["std"] }
1414
ed25519-dalek = { workspace = true }
1515
ed25519-dalek-bip32 = { workspace = true, optional = true }
16+
rand0-7 = { workspace = true }
1617
solana-derivation-path = { workspace = true, optional = true }
1718
solana-pubkey = { workspace = true }
1819
solana-seed-derivable = { workspace = true, optional = true }
@@ -22,10 +23,6 @@ solana-signer = { workspace = true }
2223

2324
[target.'cfg(target_arch = "wasm32")'.dependencies]
2425
wasm-bindgen = { workspace = true }
25-
rand0-7 = { workspace = true, features = ["wasm-bindgen"] }
26-
27-
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
28-
rand0-7 = { workspace = true }
2926

3027
[dev-dependencies]
3128
serde_json = { workspace = true }

Diff for: program/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ thiserror = { workspace = true }
9898
getrandom = { workspace = true, features = ["custom"] }
9999
solana-define-syscall = { workspace = true }
100100

101+
[target.'cfg(target_arch = "wasm32")'.dependencies]
102+
getrandom = { workspace = true, features = ["js", "wasm-bindgen"] }
103+
101104
[target.'cfg(not(target_os = "solana"))'.dependencies]
102105
num-bigint = { workspace = true }
103106
rand = { workspace = true }

Diff for: sdk-wasm/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ solana-sdk = { workspace = true }
1717
[target.'cfg(target_arch = "wasm32")'.dependencies]
1818
console_error_panic_hook = { workspace = true }
1919
console_log = { workspace = true }
20-
getrandom = { workspace = true, features = ["js", "wasm-bindgen"] }
2120
wasm-bindgen = { workspace = true }
2221
log = { workspace = true }
2322
js-sys = { workspace = true }

Diff for: sdk-wasm/src/lib.rs

+12-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@
22
#![cfg(target_arch = "wasm32")]
33
#[deprecated(since = "2.2.0", note = "Use solana_instruction::wasm instead.")]
44
pub use solana_instruction::wasm as instructions;
5-
// These imports exist in both solana_sdk and solana_program, so we use
6-
// direct imports to suppress ambiguous re-export warnings.
7-
pub use solana_sdk::entrypoint_deprecated;
85
use {::log::Level, wasm_bindgen::prelude::*};
96
pub use {
107
solana_program::*,
118
solana_sdk::{
12-
declare_deprecated_id, declare_id, entrypoint, example_mocks, feature, hash, program_utils,
13-
pubkey, *,
9+
// These imports exist in both solana_sdk and solana_program, so we use
10+
// direct imports to suppress ambiguous re-export warnings.
11+
declare_deprecated_id,
12+
declare_id,
13+
entrypoint,
14+
entrypoint_deprecated,
15+
example_mocks,
16+
feature,
17+
hash,
18+
program_utils,
19+
pubkey,
20+
*,
1421
},
1522
};
1623

Diff for: sdk/Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ solana-transaction-error = { workspace = true, features = [
174174
solana-validator-exit = { workspace = true }
175175
thiserror = { workspace = true }
176176

177+
[target.'cfg(target_arch = "wasm32")'.dependencies]
178+
getrandom = { version = "0.1.1", features = ["wasm-bindgen"] }
179+
177180
[dev-dependencies]
178181
curve25519-dalek = { workspace = true }
179182
ed25519-dalek = { workspace = true }
@@ -187,12 +190,12 @@ solana-program = { workspace = true, features = ["dev-context-only-utils"] }
187190
solana-sdk = { path = ".", features = ["dev-context-only-utils"] }
188191

189192
[package.metadata.docs.rs]
190-
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
193+
targets = ["x86_64-unknown-linux-gnu"]
191194
all-features = true
192195
rustdoc-args = ["--cfg=docsrs"]
193196

194197
[lib]
195-
crate-type = ["cdylib", "rlib"]
198+
crate-type = ["rlib"]
196199

197200
[lints]
198201
workspace = true

0 commit comments

Comments
 (0)