Giter VIP home page Giter VIP logo

janetrs's People

Contributors

edurenesto avatar grayjack avatar joboet avatar yrns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yrns iq-scm joboet

janetrs's Issues

Premature drop w/ JanetAbstract

I've noticed that for non-Copy types, the passed value to JanetAbstract::new gets dropped immediately when the mutable pointer it gets moved into goes out of scope. This isn't ideal obviously, so I've been wrapping the types in ManuallyDrop and then using ManuallyDrop::drop in the gc handler. This seems like something the API should handle for you, or at least something added to the documentation.

can't find JANET_FILE_PIPED in module evil_janet

I'm trying to create a demo:

use janetrs::client::{Error, JanetClient};

fn main() -> Result<(), Error> {
    let client = JanetClient::init_with_default_env()?;

    client.run("(print `Hello from Janet!`)")?;

    let out = client.run("(+ 2 2)")?;

    println!("{}", out);

    Ok(())
}

I don't modify the feature flags of janet.
When I try to compile, I run into this:

   Compiling janetrs v0.5.0
error[E0425]: cannot find value `JANET_FILE_PIPED` in crate `evil_janet`
   --> /home/lyh/.cargo/registry/src/github.com-1ecc6299db9ec823/janetrs-0.5.0/src/types/io.rs:319:46
    |
319 |     pub const PIPED: Self = Self(evil_janet::JANET_FILE_PIPED as i32);
    |                                              ^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `JANET_FILE_APPEND`
    |
   ::: /home/lyh/Test/hello_jrs/target/debug/build/evil-janet-3c3a63e12ae3fb5f/out/bindings.rs:94:1
    |
94  | pub const JANET_FILE_APPEND: u32 = 4;
    | -------------------------------- similarly named constant `JANET_FILE_APPEND` defined here

For more information about this error, try `rustc --explain E0425`.
error: could not compile `janetrs` due to previous error

How can I fix this? Thank you!

Conversion from Janet to 64bit integer don't match Janet logic

The TryFrom<Janet> implementation for i64 and u64 only tries to get value from the Janet value if the it is an abstract type.

While the internal Janet implementation can get if the Janet value is a number (f64/double), a JanetString or Janet Abstract

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.