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

Add ffi and JS wasm package #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 28 additions & 14 deletions Cargo.lock

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

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
[package]
name = "pubky-app-specs"
version = "0.2.1"
version = "0.3.0"
edition = "2021"
description = "Pubky.app Data Model Specifications"
homepage = "https://pubky.app"
repository = "https://github.com/pubky/pubky-app-specs"
license = "MIT"
documentation = "https://github.com/pubky/pubky-app-specs"

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

[dependencies]
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
Expand All @@ -16,6 +19,9 @@ base32 = "0.5.1"
blake3 = "1.5.4"
mime = "0.3"
utoipa = { git = "https://github.com/juhaku/utoipa", rev = "d522f744259dc4fde5f45d187983fb68c8167029", optional = true }
wasm-bindgen = "0.2.99"
serde-wasm-bindgen = "0.6.5"
js-sys = "0.3.76"

[dev-dependencies]
pubky = "0.3.0"
Expand All @@ -25,3 +31,9 @@ tokio = { version = "1.41.1", features = ["full"] }

[features]
openapi = ["utoipa"]

[profile.release]
opt-level = "z" # Requests maximum optimization for binary size (“z” stands for “size”), rather than speed.
lto = true # Enables link-time optimization, allowing the compiler to do more aggressive inlining/dead-code elimination across crates.
codegen-units = 1 # Forces compilation into a single code-generation unit, further helping inlining and dead-code elimination at link time.
panic = "abort" # Ensures panics do not generate extra stack-unwinding code, reducing binary bloat. Panics will simply abort execution.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Pubky.app Data Model Specification

_Version 0.2.1_
_Version 0.3.0_

> ⚠️ **Warning: Rapid Development Phase**
> This specification is in an **early development phase** and is evolving quickly. Expect frequent changes and updates as the system matures. Consider this a **v0 draft**.
>
> When we reach the first stable, long-term support version of the schemas, paths will adopt the format: `pubky.app/v1/` to indicate compatibility and stability.

### To build the JS package

```bash
wasm-pack build --target bundler
```

## Table of Contents

1. [Introduction](#introduction)
Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::{SystemTime, UNIX_EPOCH};

pub static VERSION: &str = "0.2.1";
pub static VERSION: &str = "0.3.0";
pub static APP_PATH: &str = "/pub/pubky.app/";
pub static PROTOCOL: &str = "pubky://";

Expand Down
Loading
Loading