Comments (3)
Gaijin is not an exception, and we definetly use file packing system. There is even DAS_NO_FILEIO define, which switches off default file access functions (as some game platforms won't allow it anyway)
To make support of any file packing system one can just implement:
class MyFileAccess final : public das::ModuleFileAccess{};
override those two functions (getNewFileInfo and getModuleInfo) and pass smart pointer to that class that to compileDaScript
In addition to that you can override class MyFileInfo final : public das::FileInfo {}, if, for example, you have some kind of memory mapped files and/or custom allocation.
Default implementation is include\daScript\simulate\fs_file_info.h but noone is required to use default.
Allowing send "just string" isn't really an option for more or less sophisiticated project, as most of scripts will require other some other modules anyway.
from dascript.
auto access = make_smart<FileAccess>();
auto fileInfo = make_unique<FileInfo>((char *) str, uint32_t(str_len));
access->setFileInfo(modName, move(fileInfo));
is the simplest way to introduce string to file access as if it was a file.
from dascript.
https://github.com/GaijinEntertainment/daScript/blob/master/examples/tutorial/tutorial00.cpp
from dascript.
Related Issues (20)
- try to AOT
- Compilation error when exporting c++ class with ManagedStructureAnnotation
- How to debug in an embedded environment using VSCode ? HOT 1
- cmake error ~~ help~~
- Which should I use “addExtern” or “addInterop”? HOT 1
- Unexpected execution when embedded module, Executed without being called~~ HOT 1
- No Garbage collection ? HOT 3
- where is libclang HOT 2
- 30304: function not found HOT 5
- How to correctly require the parent module or somewhere ? HOT 2
- How to export a array<c++ struct> to das ? HOT 3
- How to generate .wasm HOT 2
- How to list exported symbols from modules HOT 2
- Bad floating point comparisons HOT 9
- Arrays
- Optimizing related_post_gen benchmark HOT 12
- null pointer passed as argument HOT 1
- It is recommended that compiled binaries be released for download.
- Compilation error using static linking HOT 1
- Is it possible to define a single module across multiple files? HOT 2
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 dascript.