Hacker News new | ask | show | jobs
by coolreader18 1898 days ago
This is sorta similar to rustpython_wasm[0] - I haven't been super focused on it recently, but I'd love to eventually have something as in-depth and well-designed as this. Currently it has all the necessary APIs (I think) to communicate however you want between JS and Python, but I'd like to have some sort of JSProxy object in Python so accessing JS APIs can look like it does in JS. Currently, you have to do something like:

    import browser
    from browser import window

    document = window.get_prop('document')
    document_body = document.get_prop('body')
    document_body.set_prop('textContent', browser.jsstr('hi'))
[0]: https://rustpython.github.io/demo/
1 comments

Nice! What's the execution time? So far I only tried Brython and it's pretty nice:

https://github.com/brython-dev/brython

I especially like the fact that I can have the same language in the backend and the front-end and it doesn't have to be JS, which I hate with passion.