Skip to content

Commit

Permalink
feat: added wasm bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrodriguez-io committed Sep 5, 2024
1 parent c693e5a commit 6634e83
Show file tree
Hide file tree
Showing 9 changed files with 745 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
/target
.ds_store
.ds_store
/target
**/*.rs.bk
Cargo.lock
bin/
pkg/
wasm-pack.log
323 changes: 323 additions & 0 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions crates/magic-curves-wasm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/target
**/*.rs.bk
Cargo.lock
bin/
pkg/
wasm-pack.log
36 changes: 36 additions & 0 deletions crates/magic-curves-wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[package]
name = "magic-curves-wasm"
version = "0.1.0"
authors = ["Kevin Rodriguez <_@kevinrodriguez.io>"]
edition = "2018"
description = "WebAssembly bindings for the magic-curves library."
license = "MIT"
repository = "https://github.com/kevinrodriguez-io/magic-curves"
homepage = "https://github.com/kevinrodriguez-io/magic-curves"
documentation = "https://docs.rs/magic-curves-wasm"
readme = "../../README.md"
keywords = ["blockchain", "financial", "solana", "defi", "finance"]
categories = ["finance", "cryptography", "wasm"]

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["console_error_panic_hook"]

[dependencies]
magic-curves = { path = "../magic-curves" }
wasm-bindgen = "0.2.84"
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }

[dev-dependencies]
wasm-bindgen-test = "0.3.34"

[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
lto = true
Loading

0 comments on commit 6634e83

Please sign in to comment.