Comments (6)
Hi @SrinivasGourarum. In general, we currently recommend using Chakra instead of ChakraCore for UWP apps. ChakraCore is the part of Chakra that has no ties with Windows, and as you saw some of the Windows related APIs are missing (winrt/uwp projection, debugging).
Specifically for debugging, our script debugging in Chakra (JsStartDebugging) is PDM-based, so that is not part of ChakraCore as well. However, we are actively working on a new set of debugging APIs in the JSRTDebugging branch. Note that this work is not finished yet and the API shape may change, so be cautious about taking dependencies. Do let us know your thoughts in case you've tried or plan to try the debugging APIs. The parse script as library work you experimented is part of the debugging effort.
Limin
from chakra-samples.
I am assuming that once ChakraCore is released, we can have this feature(parse script as library) with Chakra as well. Meanwhile, in order to make our js files hidden from the user while debugging using Chakra for UWP apps on windows 10, we could replace the content of the js file (which we intend to hide while debugging script) with the base64 string of the serialized byte[].
byte[] serializeBuffer = JsSerializeScript(originalContent, buff, buffsize);
string base64Str = Convert.ToBase64String(serializeBuffer);
This way we are able to hide the file from debugging. My question is if someone would be able to re-generate the original content of the file if they are able to access the base64Str? Do we need to have an additional encryption for the file?
We intend to use ChakraCore for older windows versions like windows phone 8.1 and windows 8.1. Having the capability to debug the script and other debugging apis for memory usage will definitely add on to the debugging experience.
from chakra-samples.
I am assuming that once ChakraCore is released, we can have this feature(parse script as library) with Chakra as well.
JsParseScriptWithAttributes
is in ChakraCore master so you can use it now. For Chakra you might need to wait a little longer for it to be supported in UWP.
Meanwhile, in order to make our js files hidden from the user while debugging using Chakra for UWP apps on windows 10, we could replace the content of the js file (which we intend to hide while debugging script) with the base64 string of the serialized byte[].
byte[] serializeBuffer = JsSerializeScript(originalContent, buff, buffsize);
string base64Str = Convert.ToBase64String(serializeBuffer);
JsSerializeScript
is not really designed as an encryption method. In fact, I believe if you Convert.FromBase64String(base64Str)
to get the byte buffer and then call JsRunSerializedScript
with the buffer, Chakra de-serialize and expose the original script to the debugger. So someone can still access the original script if he know what he's doing. JsParseScriptWithAttributes
and JsParseScriptAttributeLibraryCode
attribute will hide your code from debugger for you. However if you use Chakra in its current state you may need additional encryption.
We intend to use ChakraCore for older windows versions like windows phone 8.1 and windows 8.1. Having the capability to debug the script and other debugging apis for memory usage will definitely add on to the debugging experience.
I'm super glad to hear it! One of our purposes to open-source ChakraCore is to make it available for pre-Windows 10 OS as Chakra.dll is not there. As a quick status update for debugging, currently we have new debugging APIs in a PR against ChakraCore master. Profiling is something we don't have now but it's on our roadmap and we will definitely look into it.
from chakra-samples.
Thanks @liminzhu. We would continue to use Chakra for windows 10 as recommended.
I strongly urge you to bring in the api "JsParseScriptWithAttributes" to Chakra as early as possible.
This will be useful in hiding host js files from debugging.
Also, is there any tentative timeframe around which we can expect ChakraCore to be released so that we can start taking dependencies?
from chakra-samples.
Sorry for the late response @SrinivasGourarum.
Duly noted. we'll work on getting this API into Chakra and Windows. It probably will land in a Win10 insider preview build first, and then in the next windows release.
We are very close to finish release/1.2 for ChakraCore (maybe just in a few weeks). For now you can build from the release/1.2 branch, or use the preview bits from our myget feed.
from chakra-samples.
Thanks @liminzhu.
That's good to hear about ChakraCore. We will plan accordingly.
from chakra-samples.
Related Issues (20)
- Adding items to a JS array using CallFunction doesn't add HOT 1
- Add ref to task in PromiseContinuationCallback HOT 1
- Details on .NET memory management requirements/gotchas HOT 3
- how to use third party js library? HOT 3
- Debugger (Local window) crashes when JavaScriptPropertyId is a local variable
- Enable beta features HOT 2
- Multi-thread code samples request HOT 6
- Any plan to support OSX in "JSRT Hosting Samples" HOT 1
- Linux_OSX_Shared/Sample.cpp Build Error HOT 4
- Unable to run the sample app in Linux HOT 4
- Updated helloWorld.py HOT 3
- C# Sample Updates HOT 3
- Generate a Class and Instance in C# HOT 1
- Q: TypeScript ? is it possible HOT 3
- Reuse parsing result HOT 1
- JsProjectWinrtNamespace sample not working in UWP Library
- Need help with C# Native.JsRunScript and async
- Linux/MacOS create function with return sample
- Move CharkaCore samples to chakra-core org
- This repo is missing important files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chakra-samples.