Comments (8)
In case there's any interest, the latest Rust version now has the initial file store working:
ukel-trie. Not complete, but getting there.
from urkel.
Wow, totally awesome! Now we just need a C implementation and we have all the bases covered. :)
from urkel.
I noticed you added flags
as a member of the node struct in the rust impl. That flags
field probably isn't as necessary for rust. In node.js it's just meant to keep heat off of the javascript GC (having one field packed into bits is smaller than having multiple properties on the object). Rust probably has the luxury of making things a lot cleaner since it has no GC overhead.
from urkel.
It is possible to export a C api from the Rust implementation. That way we don't have to maintain an extra implementation. Even for other languages we can simply write thin wrappers around the C implementation.
from urkel.
I noticed you added
flags
as a member of the node struct in the rust impl. Thatflags
field probably isn't as necessary for rust.
Ahhh, ok. I need to work through that a bit more. I actually have some uncommitted refactoring and updates I'll add that to.
from urkel.
It is possible to export a C api from the Rust implementation. That way we don't have to maintain an extra implementation. Even for other languages we can simply write thin wrappers around the C implementation.
Haven't really thought about that much. Am trying to see how far I can get with a "safe" implementation.
from urkel.
Exposing methods to C is still safe. It only means that the Rust compiler does the memory layout in a way which is compatible with C. This is arguably the best part of the Rust FFI. It allows you to gradually replace old unsafe C code with safe Rust code.
from urkel.
@chjj Regarding flags, I can't seem to find any where in the code base where the setter node.leaf = ...
is actually used. It appears flag values come solely from the node.pos
setter, is that correct? Part of my confusion here is probably coming from me trying to grok the low level storage layout/format
from urkel.
Related Issues (9)
- Major design change
- Using `urkel` optimized lib with smaller key sizes HOT 4
- Error: ENOENT: no such file or directory, uv_os_get_passwd HOT 4
- Consider switching to the merklix tree HOT 2
- Root tree cache and proofs HOT 1
- Support range proofs HOT 1
- What's the purpose of the meta file? HOT 6
- Proof fields not used. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urkel.