You should take a look at the  PyOxidizer
<https://github.com/indygreg/PyOxidizer>

I haven't used it yet, but it seems promising. The other one you should 
look at (and I have been using it) is PyO3 <https://github.com/PyO3/pyo3>, 
for writing python extensions in rust. There is also neon 
<https://github.com/neon-bindings/neon> for writing nodejs extensions in 
rust. I haven't tried it but it looks like it might be possible to write an 
extension in rust and then add some glue code using PyO3 to create python 
extension and some glue code using neon to create nodejs extension. That 
way a certain module can be used in both  nodejs (JavaScript) and in Python.

There is also my experimental mini_leo 
<https://github.com/vitalije/mini_leo> project on github. It is far from 
being finished. It requires nightly version of cargo and rustc. The 
build_wheel.py script builds a python extension written in rust which can 
load .leo files and at-file nodes. With the following script on my new 
computer:
import timeit
from mini_leo import *
def f():
    t0 = load_leo('/opt/programi/leo/trunk/leo/core/LeoPyRef.leo')
    return t0
t1 = timeit.timeit(f, number=10)/10 * 1000
def f2(tr):
    res = []
    for lev, v in iternodes(tr):
        res.append('--'*(lev - 1))
        res.append(v.h)
        res.append('\n')
    return ''.join(res)
t3 = f()
def f3():
    return f2(t3)
print(f2(t3))
print('tree contains: %d'%tree_len(t3))
print("Loading speed average: %.2fms"%t1)
t1 = timeit.timeit(f3, number=100)/100*1000
print("Iterating speed average: %.2fms"%t1)

it loads LeoPyRef.leo along with all at-file nodes in less than 80ms.

The extension module has also an iterator of nodes which iterates tree of 
9250 nodes in 7ms. Drawing tree with such an iterator shouldn't take too 
long.

Loading of other kinds of files is missing. Hopefully, I will find the time 
to finish loading all kinds of files.

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/e279fd67-7441-4b20-9981-b8ac7382d867%40googlegroups.com.

Reply via email to