-
Notifications
You must be signed in to change notification settings - Fork 15
Tracking issue for browser compatibility #53
Comments
@mafintosh I'm at a bit of an impasse with regards to One option is to adopt the |
@kasperisager ya, i say we revisit that one later and for now people need to inject that. in practice i haven't heard any "complaints" about that so we can think it through a bit. |
I can contribute the first use case: The thing I'm currently working on is a browser first, Node.js second type of thing that uses |
actually zero overhead right, cause node should just skip it? |
if you manually |
That's absolutely true, I missed that! To actually import the const events = require('events/')
The following import indeed uses the builtin module in Node.js and the const events = require('events') No cow on the ice 😉 The only gotcha is of course the DX of the whole thing; modules that use the builtin |
Ya def, on the latter was more practical for now rather than a solution. I don’t mind potentially just including events everywhere, but we should enumerate how many modules that involves and it could be a hard ask for third party ones - let’s see |
This issue tracks the remaining blockers for bundling and running Hypercore in a browser without shims. In no particular order, originally based on #52 (comment):
Buffer
withb4a
#52events
as dependency #61hypercore-crypto
to v3.1 #62Buffer.equals()
withb4a.equals()
#67Buffer
withb4a
andsodium-native
withsodium-universal
chm-diederichs/noise-curve-ed#1Buffer
withb4a
holepunchto/hypercore-crypto#8b4a
for all buffer operations holepunchto/noise-handshake#4Buffer
withb4a
holepunchto/hyperswarm-secret-stream#3Buffer
holepunchto/hyperswarm-secret-stream#4Buffer
withb4a
random-access-storage/random-access-memory#9Buffer.alloc()
withnew Uint8Array()
sodium-friends/sodium-javascript#62process.nextTick
withqueueTick
random-access-storage/random-access-memory#8process.nextTick
withqueueTick
random-access-storage/random-access-storage#12globalThis
instead ofglobal
sodium-friends/sodium-javascript#61Buffer
withb4a
mafintosh/sodium-secretstream#1Buffer
withb4a
mafintosh/is-options#2Buffer
withb4a
mafintosh/codecs#11wasm-tools
mafintosh/blake2b-wasm#17wasm-tools
mafintosh/siphash24#6wasm-tools
mafintosh/xsalsa20#7crypto_secretstream_xchacha20poly
insodium-javascript
The text was updated successfully, but these errors were encountered: