Giter VIP home page Giter VIP logo

Comments (6)

d0iasm avatar d0iasm commented on July 17, 2024 2

It works well now! I pulled e5fa143, and set up via just prelude again.
Thank you! I'll close this issue.

from wasmer-python.

Hywan avatar Hywan commented on July 17, 2024

How did you install the project? I'm not able to reproduce with master.

from wasmer-python.

Mec-iS avatar Mec-iS commented on July 17, 2024

I can confirm the problem.

I had a quick look into this and there is an hint of the possible solution in this answer. It seems that __setitem__ should consider the particular case of when a slice is passed.

I currently work-around with this implementation:

...
# Allocate memory for the subject, and get a pointer to it.
input_pointer = instance.exports.allocate(length_of_subject)

# Write the subject into the memory.
def write_to_view(bytestr, mem_view, offset=0):
    """Fill memory with values from a bytestring starting at `offset`"""
    for i, c in enumerate(bytestr):
        mem_view[offset + i] = c
    return mem_view

memory = instance.memory.uint8_view(input_pointer)
memory = write_to_view(subject, memory)
...

from wasmer-python.

Mec-iS avatar Mec-iS commented on July 17, 2024

e5fa143 fixed for me

from wasmer-python.

syrusakbary avatar syrusakbary commented on July 17, 2024

Awesome, let us know @d0iasm if that fixes the issue :)

from wasmer-python.

Hywan avatar Hywan commented on July 17, 2024

What Rust version do you have?

from wasmer-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.