Repository navigation
Releases
v0.6.0
This release is breaking: store::StoreError implements From<rusqlite::Error>, and that
rusqlite is now 0.43.
Security
- The bundled SQLite is 3.54.1, which fixes RUSTSEC-2026-0459 / CVE-2026-119375 (a database
opened with a crafted-walfile of another page size could return uninitialized memory).
rusqlitegoes from 0.39 to 0.43 with thebundledfeature still on, and so
libsqlite3-sysgoes from 0.37.0 to 0.40.0.libsqlite3-sysdeclareslinks = "sqlite3",
so a build can hold only one version of it: a dependent that usesrusqliteor
libsqlite3-sysitself must move torusqlite0.43 /libsqlite3-sys0.40 too. The
cargo denyignore for the advisory is gone.
v0.5.0
These additions are breaking: new variants in public enums and a new field on a public struct.
Added
- Relay tests, as simplex-chat 7.1.4's
/relay test(Commands.hsAPITestChatRelay):
Client::test_chat_relay(address) -> RelayTestResult/Request::TestChatRelay(JS
testChatRelay). The address's link is read, joined with a random 32-byte challenge in
x.grp.relay.test, PQ off, and the relay must answer with the challenge signed by the
address's root key within 40 seconds; the test connection is deleted either way. The
answer istypes::Event::RelayTestwithRelayTestResult { address, name, failure },
whereRelayTestFailure { step: RelayTestStep, error }carries 7.1.4'srelayTestError
messages. - Adding relays to a channel the user owns (Commands.hs
APIAddGroupRelays):
Client::add_channel_relays(group, relays)/Request::AddChannelRelays(JS
addChannelRelays). The new relays go through creation's own invitation, acceptance and
roster steps, and the link data is published again with every relay that may serve. Once
the channel has subscribers (publicMemberCountover 1, counted asupdatePublicMemberCount
does), the relays already serving get a signedx.grp.relay.newfor each newly active one.
A subscriber joins a relay an owner's verifiedx.grp.relay.newnames (Subscriber.hs
xGrpRelayNew). ChannelRelay::web_domain: the relay'sRelayCapabilities.webDomain.- The owner publishes
publicMemberCountasupdatePublicMemberCountcounts it (current
members, the owner among them, less the relays) instead of always 1. - Docs: why every channel leg is PQ off, traced through 7.1.4 and
fdbcb24d
(ChannelRelay::pq, README security notes). Relays never replay a post with no text and no
file, so a channelsend_datawith an emptyfallback_textreaches only current
subscribers (send_data,send_signed_data, README). A record of the live interop run is in
docs/channels-live.md.
Changed
- Breaking: new variants
types::Request::{TestChatRelay, AddChannelRelays},
types::Event::RelayTest,RequestKind::RelayTestand
engine::records::{ConnKind::RelayTest, Lookup::RelayTest}, and a new field on
ChannelRelay.
v0.4.0
Added
- Channels (simplex-chat 7.1.4
useRelaysgroups), owner and subscriber, through official
chat relays (simplex-chat --relay):Client::set_chat_relays/Request::SetChatRelays(Vec<ChatRelay>)(JS
setChatRelays) names the relays new channels use; only these are ever used.
ChatRelay::presets()lists 7.1.4's preset chat relays, never used by default.Client::create_channel(name)/Request::NewChannel(JScreateChannel) makes a
channel: a root key whosesha256is the channel's id, the owner's member key authorised
by it (OwnerAuth), the/c#link under it, then each relay invited with a signed
x.grp.relay.inv, itsx.grp.relay.acptlink checked to name it, the empty roster sent
and acknowledged, and its link published with LSET. Each relay's status (RelayStatus)
is onChatGroup.channel(ChannelInfo,ChannelRelay) and every change is told as
types::Event::ChannelRelay.- Posts as the channel: text, edits, deletes and
send_datain a channel go to its relays
withasGroup;Client::send_signed_data/Request::SendSignedData(JS
sendSignedData) signs them with the owner's member key. A signed body over 15 602 bytes
is refused before it is sent. connecttakes a channel's link: the link is read (LGET), its id checked, its owners kept
with their keys, and each relay joined with a signedx.memberasobserver. Posts as
the channel arrive asMessages byAuthor::Channel/MessageAuthor::Channel, or as
Event::Data { member: None }, each once however many relays bring it; the relays'
history replay comes the same way. An observer's post is refused locally
(groupUserRole: required role author). Leaving sends a signedx.grp.leave.- Signatures follow 7.1.4's channel rules (
groupBindingData:(publicGroupId, memberId);requiresSignature). - Codec: typed
x.grp.relay.{inv,acpt,test,new,reject,cap}andx.grp.roster{,.ack,.request},
GroupProfile::public_group_profile(), and the channel types inchat::channel. - Agent:
lookup_link(read an address's link data without joining it),create_channel_link
andset_link_data(LSET); the in-memory server handles LSET.
- Every channel connection is PQ off (
PQSupportOff), as 7.1.4 makes them; channels are not
end-to-end encrypted and relays keep every post.ChannelRelay::pqshows each relay
connection's negotiated state.
Changed
- Breaking: new variants in
chat::ChatEvent(the relay and roster events, which decoded
toUnknownbefore),types::Event,types::Request,MessageAuthor,client::Author,
ChatNotice,agent::client::AgentEventand the engine'sAgentEvent; new methods on the
AgentPorttrait (lookup_link,create_channel_link,set_link_data); new fields on
ChatGroup,MemberRecord,GroupRecordandSettingsRecord. Stored records still open:
the agent's connection record has a new format (6) and reads formats 1 to 5. - A channel link (
/c#) is joined instead of refused; a relay's own address (/r#) is
still refused.
v0.3.0
Added
- Application data.
Request::SendData { chat, tag, json, fallback_text }
(client.send_data; JSfriend.sendData(tag, data, fallbackText),group.sendData)
sendsjsonasx.msg.newwith the content typetag. The official apps do not know the
type and showfallback_text, as simplex-chat 7.1.4 does for anyMCUnknown; a live test
checks that the official CLI 7.1.4 keeps it as an item with that text. Content types
registered at start (ClientBuilder::data_tag,Config::data_tags; JS
Client.start({ dataTags })) arrive asEvent::Data { chat, member, tag, json }(JS
data) instead of a message. Neither side keeps an item. A tag the apps know or with
spaces, and data with atypeortextkey, are refused. Data under a tag not
registered still arrives as a message with its fallback text. Breaking:Request,
types::Eventandclient::Eventhave new variants andConfiga new field. Friend.pq(JSfriend.pq): whether the connection's ratchet uses the post-quantum KEM
both ways, as negotiated, not as asked for. It is what the ratchet used for the last
message sent and the last received (rcSndKEM,rcRcvKEM), checked after each one as
simplex-chat 7.1.4 keepspqSndEnabledandpqRcvEnabled(connPQEnabled), so it is
false until a message has gone each way and stays false with a peer without PQ. It is read
from the ratchets at each start too, so friends from before this release are listed right.
The chat list goes out again when it changes. A live test checks it against the official CLI
7.1.4. Breaking:Friendhas a new field and theAgentPorttrait a new method,
pq_on.ClientBuilder::starttakes an exclusive OS file lock (std::fs::File::try_lockon
chat.db.lockin the client's folder), held by the engine thread untilclose()returns.
A second client on the same folder, in this process or another, fails with the new
Error::Locked(folder)instead of writing the same store. Breaking:client::Error
has a new variant.ClientBuilder::key_zeroizing(Zeroizing<String>)takes the store passphrase in a buffer
that wipes itself, andConfig::keyis now aZeroizing<String>. The client keeps no
other copy: the engine thread takes the key out of its config and wipes it as soon as the
store is open (or the open failed), and the wasm client's options wipe theirs once the
store is open.ClientBuilder::key(impl Into<String>)still works; an ownedStringis
taken and wiped the same way.Config'sDebugshows the key as<redacted>. Not wiped:
a&strthe caller passed, the JS string in wasm, and the hashing state Argon2id
(and HKDF, for a store from before Argon2id) keeps while it runs. Breaking:
Config::keyis aZeroizing<String>.- Sends are tied to their outcome.
Client::send,reply,send_file,send_link,
send_live,send_dataandforward(and the same methods onFriend,Group,Chat
andMessage) return aSendHandle, and what becomes of the send arrives as
client::Event::SendStatus { handle, member, status }:Queued { item }with the
message it made, orRefused { code, detail }at once instead of an unlinked
Raw(Failed); thenSentorFailed { detail }for the friend, or for eachmemberof
a group, as the agent reportsSENTorMERR. Underneath,Request::Tagged { tag, request }wraps any request, andtypes::Event::SendStatus { tag, member, status }(JS
sendStatus) tells its outcome. A file is told once per recipient:Sentwhen the last
part of their description has gone after the upload (its offer alone is not the file),
Failedwhen the offer or a part fails, andFailedwith no member when the upload
fails or the file is cancelled or deleted first. Tags are kept in memory, so a send still
going when the client stops is told nothing after the restart. In JS,send,reply,
sendLink,sendLive,sendDataandforwardresolve with their tag,sendFilegoes
tagged too (itsqueuedstatus names the message it resolves with), and asendStatus
handler gets{ tag, member, status, item?, code?, detail? }(TypeScript
SendStatusEvent), the code named as rejections name it. Breaking:
those methods returnResult<SendHandle>instead ofResult<()>(asend(…)?used as a
matcharm's value needs a;), andRequestand bothEvents have new variants. In JS
those sends resolve with a number instead ofundefined, and a refusal of one other than a
limit arrives as itssendStatusinstead of arawFailedevent. ClientBuilder::roster_deltas(true)(JSrosterDeltas: true): the client tells what
changed instead of whole chat lists. The newEvent::FriendUpdateandEvent::GroupUpdate
(JSfriendUpdate,groupUpdate) join the adds and removes, andRaw(Chats)comes only
after the newClient::refresh()(JSclient.refresh()) asks for it.friends()and
groups()stay current, andcreate_groupstill resolves. The engine sends only what
changed too: with the newConfig::roster_deltasit marks each friend, group and request
where it is saved or dropped and sendstypes::Event::ChatsChangedwith those alone, so a
change costs the same whatever the roster's size; the first list, a refresh and a change
to the user's preferences (which every friend shows) are whole. A test checks every list
the engine suite produces against the marks. Off by default, so nothing changes for a
client that does not ask. Breaking:client::Eventandtypes::Eventhave new
variants andConfiga new field.- Documented how a program learns the friends it had before a restart:
client.friends()
(andgroups()) is complete as soon asClientBuilder::startreturns, andFriendAdd
is only for friends new since. A test holds the client to it. AFriendAddreplay at
start was not added: it would announce as new what is not, and every program would have to
tell the two apart. - A
testingcargo feature makes the in-memory SMP server and agent test doubles public
(agent::testing:FakeSmp,FakeConnector,Node, …, and the certificate builder
they use,smp::testing) and addsClientBuilder::start_in_memory(&server), which
starts a realClient(agent, engine and store) on an in-memory server the clients of a
test share. Downstream crates can run end-to-end tests with no network: such a client
does not check its relays (NativeAgent::without_relay_tests) and uses no XFTP relay, so
files do not go. CI builds and lints the feature and runstests/in_memory.rs, where two
clients connect, talk and send application data, and a friend removed right after a
message gets both, and a client hearing roster deltas gets a friend's change as one.
Fixed
- Removing a friend (and a group member, and leaving a group) deleted the connection with
everything still waiting to be sent on it, so the peer never gotx.direct.deland a
message sent just before was sometimes lost.AgentPort::deleteand the agent'sdelete
take awaitflag, which does whatdeleteConnectionsAsyncwithwaitDeliverydoes in
simplexmq: the receive queue goes at once, so nothing more arrives, and the connection
stays until what waits on it is delivered or given up, across a restart too, or 2 days
at most (connDeleteDeliveryTimeout). As in simplex-chat 7.1.4, the engine waits only
after telling the peer: removing a friend oncex.direct.delwent, leaving a group,
removing a member, and deleting a group as its owner; every other deletion is at once. A
live test removes a friend right after writing to them and sees the official CLI 7.1.4
get both the message and the deletion. Breaking:AgentPort::deleteand
AgentClient::deletetake thewaitflag.
v0.2.0
Added
-
client.saveChanges()(JS) andStore::export_changessave only the rows written since the
last save, andClient.start({snapshot, changes})andStore::open_snapshot_with_changes
open a snapshot with the changes kept after it. A change costs what it wrote: with 30,000
messages in wasm,save()takes 95 ms for 22.5 MB, andsaveChanges()after one message
under 1 ms for 1 KB. Each delta is MAC'd and chained to its snapshot and the delta before
it; a missing, repeated or reordered one isStoreError::ChangesDoNotFollow(JS
changes_do_not_follow), and deltas of an older snapshot are skipped. Breaking:
StoreErrorhas this new variant, so an exhaustivematchon it needs an arm. The README and the
Node bot example keep a log of changes instead of saving the whole store on every change. -
Disappearing messages, as SimpleX Chat 7.1.4 has them.
Request::SetTimer { chat, ttl }
(friend.set_timer,group.set_timer; JSfriend.setTimer(seconds),
group.setTimer(seconds),nullfor off) offers a friend a timer in the profile they are
sent, or sets a group's as an owner. Each message then carries itsttland is deleted with
its file: the user's own counts from sending, a received one from whenMarkReadreads it.
A friend's timer is taken over from their profile without an answer, as the official apps
do, and the conversation gets aChatNotice::Timerwhenever the timer that applies changes.
The timers last across restarts: what came due while the client was off goes at the next
start.Friend.timerandChatGroup.timergive the timer that applies, and
ChatMessage.timed(JSmessage.ttl,message.expiresAt) a message's own. Breaking:
Request,RequestKindandChatNoticehave new variants andChatMessage,Friendand
ChatGroupnew fields. -
Chat preferences, the user's own and per friend, as SimpleX Chat 7.1.4 has them.
Request::SetPrefs { friend, prefs }(client.set_prefs,friend.set_prefs; JS
client.setPrefs({ voice: "no" }),friend.setPrefs(...)) sets full delete, reactions,
voice, files, calls and the "allow" of disappearing messages toalways,yesorno,
for every friend or over the user's own for one. Each friend whose profile it changes is
sent the new one (APIUpdateProfile,APISetContactPrefs). What is on between the user and
a friend follows both sides (prefEnabled; only disappearing messages are symmetric), and
shows inFriend.features(JSfriend.features);Friend.prefsandChatProfile.prefshold
what the user set. A voice message from a friend the user does not allow is no longer kept.
Breaking:RequestandRequestKindhave new variants,FriendandChatProfilenew
fields, andUserRecordis no longerEq. -
Group admin, as SimpleX Chat 7.1.4 has it:
Request::SetMemberRole,BlockMemberForAll,
RemoveMember(with or without the member's messages),DeleteGroup,SetGroupProfile
(name and description),SetGroupPrefsandModerate, with the senders' role checks from
Commands.hs (APIMembersRole,APIBlockMembersForAll,APIRemoveMembers,APIDeleteChat,
APIUpdateGroupProfile,APIDeleteMemberChatItem). Rust:member.set_role,
block_for_all,remove,group.delete,set_profile,set_prefs,message.moderate;
JS the same in camelCase. A role change goes to every current member and the member too; a
block to the others; a removal to all before the member's connection goes once delivered; an
invited member's new role goes in their invitation again. Deleting a group removes
everything kept about it.GroupMember.role,blocked_for_all,ChatGroup.roleand
descriptionshow the result, and a role change made by anyone now leaves a
ChatNotice::MemberRole. A live test runs all of it against two official CLIs.
Breaking:Request,RequestKindandChatNoticehave new variants,GroupMemberand
ChatGroupnew fields. -
What the user keeps for themselves, as SimpleX Chat 7.1.4 has it:
Request::DeleteForMe
(APIDeleteChatIteminternal),ClearChat(APIClearChat),MarkReadUpTo
(APIChatItemsRead),SetUnreadMark(APIChatUnread),SetAlias(APISetContactAlias,
APISetGroupAlias) andSetMessageTtl(APISetChatItemTTL,APISetChatTTL), which
deletes messages older than a TTL every half hour, for every chat or one, keeping a group's
last 12 hours. Rust:message.delete_for_me,mark_read_up_to,friend.clear,
set_unread_mark,set_alias,set_message_ttl(and onGroup),client.set_message_ttl;
JS the same in camelCase.Friend.alias,item_ttl,ChatGroup.alias,item_ttl,
ChatPreview.marked_unreadandChatProfile.item_ttlshow them, andEvent::Clearedsays a
chat was cleared. Breaking:Request,RequestKindandEventhave new variants, and
Friend,ChatGroup,ChatPreviewandChatProfilenew fields. -
Voice messages:
FileKind::Voice(JS"voice") sendsMCVoicewith its length, refused
where the friend or the group does not allow the user's voice messages (Commands.hs
featureAllowed SCFVoice forUser, Internal.hsprohibitedGroupContent). Received ones show
asMessageBody::Voice(Media)with theirdurationinstead of a plain file. JSsendFile
takes{ caption, duration, preview }as a fourth argument, which it could not send before.
Breaking:MessageBody::Voiceholds aMediainstead ofsecsandwave, and
FileKindhas a new variant. -
Link previews:
Request::SendLink { chat, text, preview, reply_to }(client.send_link;
JSfriend.sendLink(text, { uri, title, description, image })) sendsMCLink, and a
received link's preview is kept inChatMessage.link(JSmessage.link) instead of being
dropped; group history keeps it too. Breaking:Requesthas a new variant and
ChatMessagea new field. -
Forwarding:
Request::Forward { from, item, to }(friend.forward(&message),
group.forward; JS the same) sends a message to another chat as the user's own with
forward: true(APIForwardChatItems,mcForward): text and link previews as they are, a
file again when it is here, else its caption. A received forward shows in
ChatMessage.forwarded(JSmessage.forwarded). Breaking:Requesthas a new variant,
ChatMessagea new field, and the engine'ssend_filetakes aFileMeta. -
Live messages, written as the other side watches:
Request::SendLiveandUpdateLive { done }
(friend.send_live,message.update_live; JSsendLive,updateLive) sendlive: true
until done (APISendMessageslive,APIUpdateChatItem). Received ones show in
ChatMessage.live, and their updates are not marked edited (edited = itemLive /= Just True). A disappearing live message counts from when it is done. An edit now carries the
message's timer, as upstream's does. Breaking:Requesthas new variants and
ChatMessagea new field. -
Direct chats with group members:
Request::ContactMember { group, member, text }
(member.contact; JS the same) makes a one-time invitation and sends it withtextover the
member's group connection inx.grp.direct.inv(APICreateMemberContact,
APISendMemberContactInvitation), where the group allows the user direct messages. The member
shows as a friend, connecting, until they accept. Breaking:Requesthas a new variant. -
"Fix connection":
Request::SyncRatchet { chat, member, force }(friend.fix_connection,
member.fix_connection; JSfixConnection) starts a ratchet re-sync with a friend or a group
member, withforceeven while the connection works (APISyncContactRatchet,
APISyncGroupMemberRatchet). The engine already started one by itself when a connection
needed it. The agent port'ssynchronize_ratchettakesforce. Breaking:Requesthas a
new variant andAgentPort::synchronize_ratcheta new argument. -
Address settings:
Request::SetAddressSettings { auto_accept, auto_reply }
(client.set_address_settings; JSsetAddressSettings({ autoAccept, autoReply })) accepts
requests to the address as they come and sends the auto-reply to each friend made through it
once connected, however the request was accepted (APISetAddressSettings, Subscriber.hs
autoAccept,sendAutoReply).
Request::ShareAddress(on)(JSshareAddress) shows the address in the profile every
friend gets (APISetProfileAddress), and deleting the address takes it out. A friend's shown
address is inFriend.address; the settings inChatProfile. Breaking:Requesthas
new variants,FriendandChatProfilenew fields, andUserRecordandAddressRecordnew
fields. -
Incognito:
Request::CreateIncognitoInvite,ConnectIncognito(link)and
AcceptIncognito(request)(client.create_incognito_invite,connect_incognito,
request.accept_incognito; JScreateInvite({ incognito: true }),
connect(link, { incognito: true }),request.acceptIncognito()) make a friend who knows
the user only by a random name from upstream's word lists (generateRandomProfile), with
the default preferences and no picture, in the invitation's link data, the handshake and
every later profile.Friend.incognitoholds the name. A retried invitation stays incognito.
Joining a group through an incognito friend, inviting one into a group, and connecting to a
group link incognito are refused, as none of them could keep the user's profile out
(CEContactIncognitoCantInvite); an incognito friend is judged against the default
preferences, as they were sent (mergeUserChatPrefs'). Breaking:Requesthas new variants and
Frienda new field; JScreateInviteandconnecttake an optional options argument.
Fixed
- The profile sent to friends said disappearing messages were allowed, so an official app
offered its user a timer, but this client kept thei...
v0.1.0
Security
- The HPACK integer decoder refuses a sixth continuation byte before shifting, so a 32-bit
(wasm) build no longer shifts past its word size on a hostile header block. - The HTTP/2 frame reader drops taken bytes once per read instead of once per frame, so a
server that sends many tiny frames costs linear time, not quadratic. - Tunnel Worker: a lease renewal that reaches the per-IP counter after the tunnel's release no
longer takes the slot back for up to 30 minutes. - A snapshot whose item or id counter is at its maximum is refused as damaged when the counter
would move, instead of panicking (debug) or wrapping to a negative id (release). - Breaking: the store key is required:
ClientBuilder::startfails without.key(…)
(it used to default to an empty key that anyone could open), and JSClient.startrefuses
an emptykey. A new store derives its key with Argon2id (19 MiB, 2 passes, 1 lane) over
the passphrase and a random per-store salt kept in itskdfmeta row, instead of one
unsalted HKDF. Stores made before still open with their old key and are not upgraded. - Snapshots are authenticated as a whole: format 2 ends with an HMAC over every byte, so a
changed, deleted or rolled-back row or a rewound counter is refused on open. The id counters
are checked against a sealed copy in both backends, which a store from before gets on its
first open, and SQLite overwrites deleted rows (secure_delete). In SQLite, putting back an
older sealed row is still not detected. - Breaking (tunnel Worker): it is no longer an open TCP proxy by default. Without
ALLOWED_HOSTSit reaches only the preset SimpleX SMP and XFTP relays;ALLOWED_HOSTSadds
hosts andALLOWED_HOSTS=*allows any public host. Every record the client sends before the
relay's first encrypted record is checked (a second ClientHello after a HelloRetryRequest
too), the relay must answer in TLS records, and the per-IP limits fail closed when the
counter or the rate limiter errors. - A blocking TLS read that fails for any reason but a timeout now fails every later read and
write too, as the sans-I/O client already did; a retry could otherwise skip a forged record. - TLS refuses handshake messages that span a key change (RFC 8446 section 5.1): the encrypted
server flight sent unencrypted in the ServerHello record, anything after the server Finished
in its record, and anything after a KeyUpdate in its record. - Stricter TLS 1.3 checks: the ServerHello must carry
supported_versions= TLS 1.3, an
extension type may appear once, EncryptedExtensions may only answer what the ClientHello
offered, a CertificateRequest must carrysignature_algorithms, records over the plaintext
limit are refused withrecord_overflow, and a record sequence number never wraps. - The blocking SMP connect (TCP, TLS and the SMP handshake) ends with
SmpError::Timeoutat
ConnConfig::connect_timeout, then the next host is tried; the timeout used to bound each
socket read, so a server dripping a byte now and then held a connect forever. Blocking XFTP
connects bound TCP and TLS by the connect timeout and the handshake by one per request. - Server certificates must be valid now:
verify_server_chainchecks every certificate's
notBefore and notAfter (no skew allowance, as upstream), in SMP connects, PKEY and XFTP. The
time comes from the newConnConfig::wall_clockandxftp::ClientConfig::wall_clock
(defaultsmp::system_wall_clock);verify_server_chainandHandshakeConfigtake it too. - SMP and XFTP connects check the server's pinned identity inside the TLS handshake, before the
client Finished, as upstream does; newTlsStream::connect_pinned,TlsClient::start_pinned,
tls::PinandTlsError::Identity. - The tunnel pool redials at once after a
1000 lifetimeclose only when the session was up
and the tunnel lived an hour; earlier ones wait out the back-off, so a hostile tunnel cannot
force a reconnect loop. - A forwarded command's answer (PRES) under the command's own nonce is refused as the proxy's
error before it is opened; it could only be the proxy reflecting the client's own PFWD body. - A relay can no longer replace a connection's per-queue key through a message header to force
a ratchet re-sync: once set, the stored key is always used, as simplexmq does. - A message that fails to decrypt no longer advances or saves the ratchet, so a tampered copy
can't destroy the key the genuine message needs. - Ed25519 signatures are checked with
verify_strict. - Ratchet and agent secrets are wiped from memory after encoding and loading.
- Envelopes above the supported client versions are refused, and invitation short links get
the same server check as addresses.
Added
-
simplex_client::limits: every limit and rule of the official SimpleX Chat 7.1.4 client in
one module, each with its upstream source (reactions, file sizes, message size, mentions,
names, bio, pictures, edit and delete windows, group roles), andlimits::checkfor a
request. -
The engine refuses what breaks them before sending, with new codes:
ReactionNotAllowed,
FileTooLarge,TextTooLong,TooManyMentions,InvalidName,NotAllowedand
PictureTooLarge(SX-CHT-018to024); JS rejects withreaction_not_allowed,
file_too_large,text_too_long,too_many_mentions,invalid_name,not_allowedand
picture_too_large.Client::requestfails at once for the rules that need no lookup. -
Display and group names are checked as upstream's
mkValidNamedoes, at most 50
characters; a changed bio is at most 160 bytes; a new store's name is checked at start. -
A friend's fourth reaction on a message, or one on a message without content, is ignored.
-
File transfers in the wasm build (browser, Node.js and Bun):
friend.sendFile,
group.sendFile,message.download()and thefileProgressevent, over a sans-I/O XFTP
session on a sans-I/O HTTP/2 client. -
Private message routing (SMP proxying,
PRXY/PFWD) with the chat's defaults; set it with
ClientBuilder::private_routing/allow_direct, orprivateRouting/allowDirectin JS. -
Initial extraction from the author's app, ported from simplex-chat v7.1.4 and simplexmq
commitfdbcb24d. -
Protocol stack: SMP queues, the agent's double ratchet with the post-quantum KEM, chat
messages, contacts, groups, XFTP files and calls. -
Low-level public modules:
smp,agent,ratchet,chat,crypto,xftp,tls,h2,
encoding,store,engine,types. -
High-level
Clientwith a builder, an event stream and request methods (nativefeature,
on by default). -
wasmfeature: the pure protocol core and small wasm-bindgen bindings for
wasm32-unknown-unknown. -
The full client on
wasm32-unknown-unknown: a JSClient(Client.start, named events,
Promise-returning calls) on a single-threaded runtime, reaching relays through a WebSocket
byte tunnel with TLS inside wasm;examples/browseris a minimal chat page. -
The same build on Node.js 22+ and Bun, over direct TCP with no tunnel; a
simplex-clientnpm
package (built byscripts/build-js.sh, not published) andexamples/node/bot.mjs. -
store: an in-memory backend beside SQLite, andexport_snapshot/open_snapshotfor a
sealed, versioned snapshot of either. -
CI for formatting, clippy, tests, wasm, MSRV 1.95, cargo-deny and docs.
-
Files in the wasm build, in browsers, Node.js and Bun:
friend.sendFile(bytes, name),
group.sendFile(bytes, name),message.download()resolving with{name, bytes}, and a
fileProgressevent. Transfers run in memory, up tosetFileLimitbytes (64 MiB unless
set), over the tunnel or TCP. -
h2::H2Clientandxftp::XftpSession: sans-I/O HTTP/2 and XFTP, driven by bytes in and out. -
Event::Offline(true)at a start without a network, from the first relay check, and
Offline(false)once a relay answers again. -
Private message routing: messages, confirmations, SKEY, LKEY and LGET for someone else's
relay go through one of our own relays (PRXY/PFWD), so that relay never sees our IP
address.Config::proxy_modeandConfig::proxy_fallbackchoose when; they default to the
chat'sunknown(proxy unless the relay is one of ours) andprotected(never fall back to
a direct connection, as this client has no SOCKS or onion transport).AgentConfighas the
same settings, defaulting to the agent'snever. -
The preset relays in use are checked like own relays when the config names none.
-
Chat notices for a peer's address switch and for ratchet re-syncs
(ChatNotice::AddressSwitch,ChatNotice::RatchetSync). -
The JS package runs on Bun too; CI runs the JS tests on Node.js and Bun.
-
Objects to act on:
Message(reply,react,edit,delete,author,chat),
FriendRequest(accept,reject),Friend(send,remove,history,show_code),
Group(send,add_member,leave,members),GroupInviteandMember, in Rust and
in JS. The client keeps the chat list:friend(id),friends(),groups(), and
create_groupreturns the newGroup(JS:client.friends,client.groups,
createGroup).
Changed
Ratchet::decryptno longer advances on failure;MsgEncryptKey::encrypt_msgtakesself.- JS rejections carry a snake-case
codeeverywhere (no_connectioninstead of
SX-CHT-004); a file over the memory limit rejects withfile_too_large, nottoo_large. - JS calls that queue a request (
send,react,edit,delete, …) now reject when the
request breaks a limit, instead of resolving. setFileLimitnever goes above 1 GiB, the official client's file limit.- A message whose JSON is over 15 602 bytes is refused even when it would compress to fit,
as upstream refuses it. types::REACTION_EMOJIislimits::REACTIONS, a slice;chat::reaction::REACTION_EMOJIis
gone.- Breaking: `simplex_client::...