Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: wasm sdk build proof-of-concept #2405

Open
wants to merge 37 commits into
base: v2.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9b94e8e
build: update wasm-bindgen-cli to 0.2.99
lklimek Dec 17, 2024
a27cdb3
build: bump wasm-bindgen-futures to 0.4.49
lklimek Dec 17, 2024
7475b09
chore(wasm-dpp): fix build
lklimek Dec 17, 2024
068a6fb
chore: dapi-grpc wasm feature
lklimek Dec 19, 2024
3f3f76d
chore: WIP
lklimek Dec 20, 2024
cc1b069
chore: some tests
lklimek Dec 20, 2024
7243de5
chore: experiments
shumkov Jan 2, 2025
c833fb0
chore: fix build issues
lklimek Jan 2, 2025
815a364
feat(wasm-sdk): wasm_channel working on browser
lklimek Jan 2, 2025
aa9ecf8
feat: fetch identity in browser
lklimek Jan 3, 2025
1d3fe75
chore: update quorum keys
lklimek Jan 6, 2025
f6df953
chore: demo fetching contract and identity
shumkov Jan 7, 2025
971c7d2
Merge branch 'v1.8-dev' into feat/wasm-dapi-sdk-client
shumkov Jan 7, 2025
4567c60
chore(wasm): expose more code as bindings
lklimek Jan 8, 2025
0a34d38
deps: rs-tenderdash abci from revision
lklimek Jan 8, 2025
d75387b
Merge remote-tracking branch 'origin/feat/wasm-dapi-sdk-client' into …
shumkov Jan 13, 2025
0417b33
build(dpp): add optimization flags to dpp wasm build script
shumkov Jan 13, 2025
d7c1ebf
deps: change rs-tenderdash-abci version
lklimek Jan 13, 2025
e243d9e
chore: fix build
lklimek Jan 13, 2025
eb29ae9
Merge remote-tracking branch 'origin/feat/wasm-dapi-sdk-client' into …
lklimek Jan 13, 2025
1471068
refactor: replace wasm feature with target_arch
lklimek Jan 13, 2025
fbf6309
chore: remove wasm feature, continued
lklimek Jan 13, 2025
4d4c6a0
chore: replace deprecated FromMilis/ToMilis
lklimek Jan 13, 2025
9df8371
chore(drive-abci): fix build
lklimek Jan 13, 2025
6cb9d19
chore: fix rs-dapi-client build
lklimek Jan 13, 2025
e315a77
Merge remote-tracking branch 'origin/v1.8-dev' into feat/wasm-sdk-poc2
lklimek Jan 13, 2025
f594438
chore: exclude wasm-sdk from cargo.toml
lklimek Jan 13, 2025
cdccee5
chore(drive-abci): fix build and tests
lklimek Jan 13, 2025
96899b5
chore(dpp): fix dpp build with no features
lklimek Jan 13, 2025
5147a41
chore: minor refactor
lklimek Jan 13, 2025
af2a843
Merge remote-tracking branch 'origin/v2.0-dev' into feat/wasm-sdk-poc
lklimek Jan 22, 2025
7b9cac4
chore: fix build error
lklimek Jan 22, 2025
b06ddce
revert(dpp): changes in from_document break tests
lklimek Jan 22, 2025
514e723
revert(dpp): rs-dpp/schema is needed for js packages tests
lklimek Jan 22, 2025
2336773
chore(wasm-sdk): cargo.toml fixes
lklimek Jan 22, 2025
e7213a7
chore: code rabbit review
lklimek Jan 23, 2025
8993532
chore(rs-dapi-client): fix rs-dapi-client tests
lklimek Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cargo/config-release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ rustflags = ["-C", "target-feature=-crt-static", "-C", "target-cpu=x86-64-v3"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[target.wasm32-unknown-unknown]
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ rustflags = [
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[target.wasm32-unknown-unknown]
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']

[build]
rustflags = ["--cfg", "tokio_unstable"]
87 changes: 63 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ members = [
"packages/check-features",
"packages/wallet-utils-contract",
]

exclude = ["packages/wasm-sdk"] # This one is experimental and not ready for use

[workspace.package]

rust-version = "1.83"
Expand Down
37 changes: 24 additions & 13 deletions packages/dapi-grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ platform = []
# Re-export Dash Platform protobuf types as `dapi_grpc::platform::proto`
# Note: client needs tls and tls-roots to connect to testnet which uses TLS.
tenderdash-proto = []
client = [
"tonic/channel",
"tonic/transport",
"tonic/tls",
"tonic/tls-roots",
"tonic/tls-webpki-roots",
"platform",
]
server = ["tonic/channel", "tonic/transport", "platform"]
serde = ["dep:serde", "dep:serde_bytes"]

# Client support.
client = ["platform"]

# Build tonic server code. Includes all client features and adds server-specific dependencies.
server = ["platform", "tenderdash-proto/server", "client"]

serde = ["dep:serde", "dep:serde_bytes", "tenderdash-proto/serde"]
mocks = ["serde", "dep:serde_json"]

[dependencies]
tenderdash-proto = { git = "https://github.com/dashpay/rs-tenderdash-abci", version = "1.2.1", rev = "a558c0a2deab149183f125a012b14b709150401c", default-features = false }

prost = { version = "0.13" }
futures-core = "0.3.30"
tonic = { version = "0.12.3", features = [
Expand All @@ -42,12 +42,23 @@ tonic = { version = "0.12.3", features = [
serde = { version = "1.0.197", optional = true, features = ["derive"] }
serde_bytes = { version = "0.11.12", optional = true }
serde_json = { version = "1.0", optional = true }
tenderdash-proto = { git = "https://github.com/dashpay/rs-tenderdash-abci", version = "1.2.1", tag = "v1.2.1+1.3.0", default-features = false, features = [
"grpc",
] }
dapi-grpc-macros = { path = "../rs-dapi-grpc-macros" }
platform-version = { path = "../rs-platform-version" }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tonic = { version = "0.12.3", features = [
"codegen",
"prost",
"channel",
"transport",
"tls",
"tls-roots",
"tls-webpki-roots",
], default-features = false }

[build-dependencies]
tonic-build = { version = "0.12.3" }

Expand Down
Loading
Loading