Giter Club home page Giter Club logo

rusty_jsc's People

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  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

rusty_jsc's Issues

Pass values to/from [callback] function?

I haven't been able to figure out how to pass value(s) to a Rust callback nor how to read an output value on the JS side from a Rust callback.

If you could provide a simple example for each of those that'd be very much appreciated!

Serde for JSC?

Are there any plans for adding a Serde serializer/deserializer for JSC values?

Get tags for released versions

Hi!

I'm not sure if the information is entirely recoverable but is there a chance to get tags to match the released versions? (or at least 0.1.0). While trying to workaround for some seemingly missing concepts (specifically Promises and Protection) I see there's a commit dated on Apr 25th that includes some of these developments but these are not on 0.1.0 even tho it's dated Apr 27th.

So if there's a way to get that it'd be terrific. Also to know if there are plans on releasing the latest work.

Thanks for the hard work! I'm still in my very early stages with rust but I'm enjoying working with this wrapper.

WebCore

Hey, this looks great!

Applogies if this is a silly question, I’ve essentially just started exploring the space :)

Is it possible to load & call into WebCore APIs; eg fetch?

Also, perhaps relatedly, how I can discover what the context provides by default? I see the punjs (lol, A+) example runs a console.log script but 1) where is console coming from? 2) I don’t see it log, so is that effectively a noop since evaluateScript only prints the return value? Or do I have to define my own console global callback which passes thru to println?

Thanks !

Building with cargo-wasi

Hello, I'm trying to use cargo-wasi to build a rust app that uses rusty_jsc, but I'm seeing this error when I run cargo wasi build:

❯ cargo wasi run 
   Compiling rusty_jsc_sys v0.0.2
   Compiling anyhow v1.0.66
   Compiling rusty_jsc_sys v0.0.3
error: library kind `framework` is only supported on Apple targets

error: could not compile `rusty_jsc_sys` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `rusty_jsc_sys` due to previous error

My Cargo.toml is simple:

[package]
name = "project"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rusty_jsc = "0.0.2"
rusty_jsc_macros = "0.0.3"
rusty_jsc_sys = "0.0.3"

And the main.rs is just one of your examples:

use rusty_jsc::JSContext;

fn main() {
    let mut context = JSContext::default();
    let value = context.evaluate_script("'hello, world'", 1);
    if let Some(value) = value {
        println!("{}", value.to_string(&context));
    }
}

Any ideas? I'm new to the world of WASI so hopefully its something I just don't understand

Doesn't build on Windows

The build script for rusty-jsc-sys doesn't include a main() function on Windows, which means builds will fail with the following error on Windows:

error[E0601]: `main` function not found in crate `build_script_build`
 --> C:\Users\Work\.cargo\registry\src\github.com-1ecc6299db9ec823\rusty_jsc_sys-0.1.0\build.rs:9:2
  |
9 | }
  |  ^ consider adding a `main` function to `C:\Users\Work\.cargo\registry\src\github.com-1ecc6299db9ec823\rusty_jsc_sys-0.1.0\build.rs`

I suspect we'll need to do a bit more to make things link than just stubbing out the main() function, but I've never built JavaScriptCore from source so I'm not sure how to go about it.

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.